Posted: Sun Aug 10, 2008 18:36 Post subject: Static Ip PPTP WAN connection
I think I found the source of dd-wrt's problems with ISPs using PPTP static IPs.
I couldn't test it, because the process to compile from source is way too long for the time I want to spend on it.
The issue seems to be that it's overwriting the ip and netmask of the wan interface with the one from the pptp conection. When the PPTP connection is made via DHCP DD-wrt is not overwriting the values.
If someone could check the patch and create an image for dir-300 I could test it out.
That is exactly the problem i have with my DIR-300. I can connect to my ISPs VPN using PPTP. However it seems as if DD-WRT overwrites my static client IP with the WAN ip from the modem. On the next wan ip address refresh (yes my ISP is that inconvenient to its customers) dd-wrt cannot connect to the modem, since its client ip has changed.
I am currently using DD-WRT v24-sp2 build 11898. Older versions did not work on my DIR-300 (did the cyclic boot thingy).
Joined: 06 Jun 2006 Posts: 7492 Location: Dresden, Germany
Posted: Tue Mar 23, 2010 22:31 Post subject:
i will review it and integrate it, if if the patch is correct. if i understand correct, its just a reconnect problem if the isp disconnects you _________________ "So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Joined: 06 Jun 2006 Posts: 7492 Location: Dresden, Germany
Posted: Wed Mar 24, 2010 0:51 Post subject:
this sourcecode is usless. its based on a more than 2 years old sourcebase _________________ "So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Joined: 06 Jun 2006 Posts: 7492 Location: Dresden, Germany
Posted: Wed Mar 24, 2010 0:54 Post subject:
in addition. udhcpc is not responsible for static ip based pptp connections. its responsible for pptp with dhcp _________________ "So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
OK, sorry for some misrepresentation. In fact I'm having a different router, but the same problem.
I really went through all that bunch of threads and posts that are at least somehow related to PPTP issues. I've seen some Austrian guys praying for the solution as considerable number of ISPs in Austria connect users using PPTP. No solution was in place. I'm not saying that someone is wrong and someone is right, I really respect DD-WRT team for their hard work, but I would just like to point out that it seems to me (as a person closely enough related to IT and all this developing stuff) as a very strange bug that could have been eliminated after a very simple test run, I mean, it's to obvious: Basic setup tab, PPTP static and viola - here is the bug, the system overwrites your input after successful connect to ISP.
OK, thats all for bla-bla-bla, let's turn to real issue.
The issue is clear: I input all the stuff on Basic setup tab for PPTP with dhcp off, the router connects successfully and immediately overwrites all addresses with the ones, received from ISP so, that reconnect won't be possible.
I have no idea in which part of the firmware the bug is actually, cause I don't have enough time unfortunately to mess around with source and even couldn't get source for my router, but if it could be of some help, I'll post some command outputs that I already posted on some Russian thread (no progress there).
nvram show|grep wan
wan_get_dns=***.***.160.26 ***.***.161.26
wan_lease=0
http_wanport=8080
wan_gateway=172.30.96.1
wan_hwname=
wan_domain=
wan_netmask=255.255.255.255
wan_ifname2=eth1
block_wan=1
dr_wan_rx=0
wan_dns=***.***.160.26 ***.***.161.26
dhcp_wins=wan
wan_proto=pptp
wanup=1
wan_default=eth1
wan_ifnames=eth1
dr_wan_tx=0
wan_primary=1
openvpn_onwan=0
dhcp_domain=wan
wan_dial=0
wan_gateway_buf=0.0.0.0
wan_vdsl=0
wan_iface=eth1
upnp_wan_proto=
wan_ipaddr=***.***.165.249 -- IP received from ISP through PPTP
wan_ipaddr_buf=***.***.165.249 -- IP received from ISP through PPTP
wan_wins=0.0.0.0
wan_mtu=1460
sshd_wanport=60003
wan_get_domain=
wan_ifname=eth1
wan_hostname=
ddns_wan_ip=0
eth1 Link encap:Ethernet HWaddr **:**:**:**:**:**
inet addr:192.168.144.149 -- This is just the one that is needed by ISP as my static internal IP
Bcast:192.168.144.255 Mask:255.255.255.0
inet6 addr: fe80::223:69ff:fec2:6625/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:174354 errors:0 dropped:267450906 overruns:0 frame:0
TX packets:25022 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12401514 (11.8 MiB) TX bytes:8430507 (8.0 MiB)
So in fact it seems to me that the problem is either in some kind of bridging or in the module that receives and stores the VPN routing information.
Looking forward to your kind replies and always ready to support with any kind of info needed.
I've said that my router is Linksys WRT160NL that is even not broadcom based. If I'm not mistaken, there is the only version of DD-WRT for it. Maybe there's something I've missed, but neither in router database nor in any other sections of the site any different builds are present for this device.
I have Linksys WRT54G
Firmware: DD-WRT v24-sp2 (10/10/09) mini (build 13064)
and same problem. Looks like that's the latest or no?
is there anything can help me with static IP change? It got me crazy today changing IP back 10 times already (some problems with PPTP server and it disconnects)
Well, actually the problem is not exactly the same, but somehow still there. Now the PPTP connection will not overwrite static IP and mask, but it still overwrites wan_gateway. Normally, this will no longer affect reconnecting the PPTP, because a route is automatically added just like you do "route add <pptp_server_ip> gw <wan_gateway>" before wan_gateway is overwritten. So next time router reconnects PPTP, it will reach PPTP server via that route.
But the problem happens when you reboot the router. Since wan_gateway is changed to PPTP server gateway, which is not reachable after reboot, the default route will not be established. i.e. after reboot, you can't find default route in route table. Then the router can't connect to PPTP server, as the route added above is also removed after reboot.
My solution is simple: add a startup script:
"if [ -z `route|grep default` ]; then route add default gw <your_local_wan_gateway>;fi" _________________ WR841N v7.2
DD-WRT brainslayer 17201