|
Page 3 of 3
7a) If you are working on the VPN client WRT skip to step 7b. On the VPN server WRT copy the following script and paste on the command line. (Check the scipt for comments on the few items than need to be updated to match your environment.) ------------------- Copy starting below this line. ------------------- nvram set rc_firewall=' #!/bin/sh
## ## ##
#copy openvpn binary to myvpn. Otherwise, something will kill the process cp /usr/sbin/openvpn /tmp/myvpn
#needed to allow incoming connections iptables -I INPUT 2 -p udp --dport 1194 -j ACCEPT
/tmp/myvpn --mktun --dev tun0 ifconfig tun0 10.0.100.1 netmask 255.255.255.252 promisc up ## Change 192.168.2.0 to the network of the remote network. (The network on the Client VPN WRT) route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.0.100.2 iptables -I FORWARD -i br0 -o tun0 -j ACCEPT iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
/tmp/myvpn --dev tun0 --secret /jffs/static.key --comp-lzo --port 1194 --proto udp --verb 3 --daemon --ping 30 --ping-restart 120 ' --------------- Stop here when selecting text to copy -------------------------- 7b) On the VPN clien WRT ctopy the following script and paste on the command line. (Check the scipt for comments on the few items than need to be updated to match your environment.) ------------------- Copy starting below this line. -------------------
nvram set rc_firewall=' #!/bin/sh
## ## ##
#copy openvpn binary to myvpn. Otherwise, something will kill the process cp /usr/sbin/openvpn /tmp/myvpn
#needed to allow incoming connections iptables -I INPUT 2 -p udp --dport 1194 -j ACCEPT /tmp/myvpn --mktun --dev tun0 ifconfig tun0 10.0.100.2 netmask 255.255.255.252 promisc up ## Change 192.168.1.0 to the network of the remote network. (The network on the Server VPN WRT)
route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.0.100.1 iptables -I FORWARD -i br0 -o tun0 -j ACCEPT iptables -I FORWARD -i tun0 -o br0 -j ACCEPT ## Change the VPNSERVER.dnsalias.com portion to the DNS name of the VPN server WRT or its IP address. /tmp/myvpn --dev tun0 --secret /jffs/static.key --comp-lzo --port 1194 --proto udp --verb 3 --daemon --remote VPNSERVER.dnsalias.com --ping 30 --ping-restart 120 ' --------------- Stop here when selecting text to copy --------------------------
8) Type nvram commit and hit <enter> 9) Now reboot you routers and attempt to ping hosts accross the VPN tunnel. (You will not be able to ping the WRTs addresses. You have to ping a host on the network other than the WRT.) That should be it and good luck! Only registered users can write comments. Please login or register. Powered by AkoComment!
<< Start < Prev 1 2 3 Next > End >> |