Skip to content

Instantly share code, notes, and snippets.

@akopdev
Created August 20, 2019 11:27
Show Gist options
  • Save akopdev/6b0a72f72d1f3d75cd228ae75c9fd9ed to your computer and use it in GitHub Desktop.
Save akopdev/6b0a72f72d1f3d75cd228ae75c9fd9ed to your computer and use it in GitHub Desktop.
Как установить VPN
wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh
@akopdev
Copy link
Author

akopdev commented May 6, 2022

Connect huawei router

Modify the iptables rules in /etc/iptables.rules

Replace all the INPUT lines with these three:

Code:

-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p udp -m multiport --dports 500,1701,4500 -j ACCEPT

in the firewall rules, open the UDP ports 500, 1701 and 4500.

On the router in the VPN page:

Connection type: L2TP VPN client
LNS address: VPN server IP
Hostname: a friendly name (e.g. "GCP VPN")
Tunnel password: the "IPsec PSK" returned by the VPN server script
Handshake interval: 60s
PPP user name: the "Username" returned by the VPN server script
PPP password: the "Password" returned by the VPN server script
Authentication: auto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment