Posted: Mon May 28, 2007 12:54 Post subject: I can smell it working....but....Point to Point VPN Route
Guys/Gals - please be gentle - I am noobish and need some gaps to be filled in...
....Background.....
I have a Draytek Vigour 2910G (192.168.3.1) at one VPN end and the other end I have my trusty DD-WRT WRT54g V2 (192.168.5.1).
Ive currently set up a LAN to LAN VPN between the two devices.
I am running PPTP Server on the DD-WRT and the Draytek has a 'Dial-Out' Client to the DD-WRT to initiate the 'Lan to Lan' connection. It negotiates, connects and I can ping each router's IP address from the other router.
... Routing ...
I have set up a Static Route via the web interface on the Draytek and it looks like it is happy.
S~ 192.168.5.0/ 255.255.255.0 via 192.168.5.1, VPN
(S~ means static)
Problem is on the DD-WRT side - this is the ifconfig.
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.5.1 P-t-P:192.168.3.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1450 Metric:1
Through reading/googling, I have found with the following command I can route the traffic and it seems to work (sometimes)....
I have found that I cant add the route before the Draytek dials the DD-WRT.
What is the simplest way to add the route 'permanently'.
As a 'hack' I added, to the startup on the Administrations/Commands/Startup
sleep 120; route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.1
So in the 2 minutes I *hope* that the Draytek has tried to re-establish the connection...and sometimes it all works!!! I can ping from (say) 192.168.3.100 to 192.168.5.22 and visa versa but most of the times I can't
Any suggestions to getting a static route to 'stick' for a noobish person like me?
You're wanting to designate, in the WRT, a static IP for the Draytek? Is that correct? If so, go to "Services" in the router's GUI. Near the top, you'll see "Static Leases" and add/remove buttons. Click "Add", enter the MAC, name and desired IP of the device, then click "Save Settings" at the bottom of the page. If you're doing more than one static address, click "Add" and create empty fields for as many static IP's as you want, then fill all fields, then save settings. If I've misunderstood and you're asking something else, disregard!!
anectine17 - thanks for your reply - Im not sure that that will help in this instance.
The funny thing is with a 'Lan to Lan' VPN is that (as far as I have read and pinged) the Draytek dosent get its 'own' IP address like a traditional dial-in - like from a Windows Client.
The way that I am thinking is, its sort of like a CAT5 network cable connecting the 2 routers on 2 LAN ports - and Ive got t o figure out a way to route the trafic to each other.
Im still trying a number of routing commads to see if one will 'stick'...
I cant quite figure out why, in the DD-WRT's Static Route Admin Page they dont come up after I have addded them into the router via SSH.
Eg. when I type 'route' in Putty I get
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.1 * 255.255.255.255 UH 0 0 0 ppp0
192.168.5.0 * 255.255.255.0 U 0 0 0 br0
192.168.3.0 192.168.3.1 255.255.255.0 UG 0 0 0 ppp0
211.999.999.999 * 255.255.255.0 U 0 0 0 vlan1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default c211-28-999-1.e 0.0.0.0 UG 0 0 0 vlan1
default DD-WRT 0.0.0.0 UG 0 0 0 br0
But the Setup/Advanced Routing/Show Routing table only shows..
192.168.5.0 255.255.255.0 0.0.0.0 LAN & WLAN
211.28.146.0 255.255.255.0 0.0.0.0 WAN
0.0.0.0 0.0.0.0 211.28.146.1 WAN
0.0.0.0 0.0.0.0 192.168.5.1 LAN & WLAN
Why Dosent it show my *entire* routing table?
Cheers,
KonMan
edit: Im thinking that I will need either a Cron job - or - I will do some more googling to see if a script can be run when a client connects to the DD-WRT.
edit2 : Found a good reference : http://pptpclient.sourceforge.net/routing.phtml#lan-to-lan The 'Lan to Lan' diagram is what Im trying to achieve .... and its got heaps of examples for the routing... Looks like I will have to read up on 'iptables' command...hmm.. looks complex...