![]() ![]() OpenVPN client is pre-installed in GL.iNet routers GL-AR150, GL-AR300M, GL-MT300N, GL-MT300A, GL-USB150, GL-AR750, GL-B1300 from firmware v2.19. ![]() Or something like that.This docs is only related to OpenVPN client. if then networksetup -setdnsservers Ethernet $vpngw networksetup -setdnsservers Airport $vpngw echo new dns set fi fiCheck out this post on updating client-side DNS servers if you'd like to update all of your adapters instead of the ones most often used (Ethernet and Airport.) If then networksetup -setdnsservers Ethernet empty networksetup -setdnsservers Airport empty echo dns reset fi else # Set it to the VPN gw route add $vpnserver $currentgw sleep 7 route delete default route add default $vpngw echo $currentgw >. If then # Set it back to the regular gateway route delete default route delete $vpnserver $previousgw route add default $previousgw rm. Kill -9 `ps aux | grep nf |grep config| awk ''` I decided to save time and just do it through the startup script instead. I want to route all my traffic through the VPN but I was unable to get route-gateway and redirect-gateway to work inside of nf. #nf remote my. port 443 dev tap0 secret static.key proto tcp-client comp-lzo Don't forget to make startvpn.sh executable. Save the following two scripts as nf and startvpn.sh, respectively. Place them in ~/Library/openvpn.įor your key, copy/paste your static.key from the dd-wrt router into a file named secret.key. Iptables -I INPUT 1 -p tcp -dport 443 -j ACCEPT /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEĬlient You will be creating 2 scripts and one key: nf, startvpn.sh and secret.key. Save that to Startup Scripts - Next, back in the blank box, we'll place the code for the firewall and NAT: Openvpn -mktun -dev tap0 brctl addif br0 tap0 ifconfig tap0 0.0.0.0 promisc up echo " -BEGIN OpenVPN Static key V1-END OpenVPN Static key V1- "> /tmp/static.key ln -s /usr/sbin/openvpn /tmp/myvpn /tmp/myvpn -dev tap0 -secret /tmp/static.key -comp-lzo -port 443 -proto tcp-server -verb 3 -daemon ![]() Server - Generate the static key: openvpn -genkey -secret static.key - Cat that key and place it in your clipboard - Open up dd-wrt's admin webpage, and go to Administration -> Commands. I also avoid using the default protocol and port (udp, 1194) and go with tcp port 443. We will not be using dd-wrt's GUI to enable or configure OpenVPN, but rather startup and firewall scripts in the /tmp directory. I hate the 192.168 subnet it's aesthetically unappealing and overused. So go download and compile these or use MacPorts.įirst thing is first, I changed the subnet on my wireless router. Not because I'm leet, but because the network I was on blocked sync and I couldn't use MacPorts. I downloaded all of these then compiled and installed them myself. Server - A Linksys WRT54GL router - dd-wrt.v24_vpn_generic.bin (follow instructions on the website to flash from scratch.)Ĭlient - MacOS X Snow Leopard - OpenVPN v2.1.3 - tuntap_ - lzo 2.02 Network - No web proxy or a proxy that allows persistent connections. This solution can probably be way more automated using tunnelblick, but I'm alright with running a couple scripts (for now) to get my VPN going. I figured it out using a combination of webistes, including dd-wrt's OpenVPN wiki, OpenVPN's documentation, and. It allows you to connect a Mac OS X OpenVPN client to an OpenVPN server using a static key. If you find yourself on a really restrictive network but still want to connect to a remote VPN, consider this solution.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |