Last active
August 29, 2015 14:02
-
-
Save ngty/5eb0611915b69c651e1d to your computer and use it in GitHub Desktop.
VyperVPN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ISP_FALLBACK=no | |
STARTUP_LAPSE=120 | |
# PPTP settings | |
# Remote Subnet: 0.0.0.0 | |
# Remote Subnet Mask: 255.255.255.0 | |
# MPPE Encryption (note the space is not typo): mppe required,no40,no56,stateless | |
# MTU (use default): 1450 | |
# MRU (use default): 1450 | |
# NAT: Enabled | |
# Username: ... | |
# Password: ... | |
# List of VyperVPN servers, not used in this script, just for future reference | |
# (from https://www.goldenfrog.com/support/vyprvpn/vpn-setup/dd-wrt/pptp) | |
# Los Angeles, CA ~ us1.vpn.goldenfrog.com | |
# Washington, DC ~ us2.vpn.goldenfrog.com | |
# Austin, TX ~ us3.vpn.goldenfrog.com | |
# Miami, FL ~ us4.vpn.goldenfrog.com | |
# Toronto ~ ca1.vpn.goldenfrog.com | |
# Amsterdam ~ eu1.vpn.goldenfrog.com | |
# Copenhagen ~ dk1.vpn.goldenfrog.com | |
# Stockholm ~ se1.vpn.goldenfrog.com | |
# Hong Kong ~ hk1.vpn.goldenfrog.com | |
# London ~ uk1.vpn.goldenfrog.com | |
# Paris ~ fr1.vpn.goldenfrog.com | |
# Frankfurt ~ de1.vpn.goldenfrog.com | |
# Zurich ~ ch1.vpn.goldenfrog.com | |
# Moscow ~ ru1.vpn.goldenfrog.com | |
# Luxembourg ~ lu1.vpn.goldenfrog.com | |
# Bucharest ~ ro1.vpn.goldenfrog.com | |
# Singapore ~ sg1.vpn.goldenfrog.com | |
# Dublin ~ ie1.vpn.goldenfrog.com | |
# Kuala Lumpur ~ my1.vpn.goldenfrog.com | |
# Rome ~ it1.vpn.goldenfrog.com | |
# Madrid ~ es1.vpn.goldenfrog.com | |
# Tokyo ~ jp1.vpn.goldenfrog.com | |
# Seoul ~ kr1.vpn.goldenfrog.com | |
# Oslo ~ no1.vpn.goldenfrog.com | |
# Istanbul ~ tr1.vpn.goldenfrog.com | |
# Helsinki ~ fi1.vpn.goldenfrog.com | |
# Warsaw ~ pl1.vpn.goldenfrog.com | |
# Lisbon ~ pt1.vpn.goldenfrog.com | |
# Prague ~ cz1.vpn.goldenfrog.com | |
# Vienna ~ at1.vpn.goldenfrog.com | |
# Brussels ~ be1.vpn.goldenfrog.com | |
# Vilnius ~ lt1.vpn.goldenfrog.com | |
# Sydney ~ au1.vpn.goldenfrog.com | |
# Melbourne ~ au2.vpn.goldenfrog.com | |
# Perth ~ au3.vpn.goldenfrog.com | |
# Jakarta ~ id1.vpn.goldenfrog.com | |
# Auckland ~ nz1.vpn.goldenfrog.com | |
# Hanoi ~ vn1.vpn.goldenfrog.com | |
# Bangkok ~ th1.vpn.goldenfrog.com | |
# Reykjavík ~ is1.vpn.goldenfrog.com | |
# Manila ~ ph1.vpn.goldenfrog.com | |
# São Paulo ~ br1.vpn.goldenfrog.com | |
# Mexico City ~ mx1.vpn.goldenfrog.com | |
sleep $STARTUP_LAPSE | |
PPTPSERVER=$(/usr/sbin/nvram get pptpd_client_srvip) | |
PPTPGWY=$(/usr/sbin/nvram get wan_gateway) | |
/sbin/route add -host $PPTPSERVER gw $PPTPGWY dev vlan2 | |
/sbin/route del default | |
if [ "${ISP_FALLBACK}x" == "yesx" ]; then | |
/sbin/route add default gw $PPTPGWY metric 100 | |
fi | |
/sbin/route add default dev ppp0 | |
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment