Static Ip PPTP WAN connection

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Author Message
Fran6co
DD-WRT Novice


Joined: 10 Aug 2008
Posts: 1

PostPosted: Sun Aug 10, 2008 18:36    Post subject: Static Ip PPTP WAN connection Reply with quote
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.
Sponsor
phyrexianhulk
DD-WRT Novice


Joined: 01 May 2009
Posts: 2

PostPosted: Fri May 01, 2009 7:30    Post subject: Yep. Reply with quote
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).

Is there any solution to the problem yet?

Thanks!
yurkesh
DD-WRT Novice


Joined: 08 Mar 2010
Posts: 5

PostPosted: Mon Mar 08, 2010 23:20    Post subject: Attention needed Reply with quote
Very sad to see that this issue wasn't yet somehow solved. This is exactly the root of the problem with PPTP with static IPs
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Tue Mar 23, 2010 21:49    Post subject: Reply with quote
install the latest beta
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Tue Mar 23, 2010 22:31    Post subject: Reply with quote
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
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Wed Mar 24, 2010 0:51    Post subject: Reply with quote
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
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Wed Mar 24, 2010 0:54    Post subject: Reply with quote
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
yurkesh
DD-WRT Novice


Joined: 08 Mar 2010
Posts: 5

PostPosted: Thu Mar 25, 2010 17:02    Post subject: Reply with quote
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.

I'm havig Linksys WRT160NL. DD-WRT Firmware: DD-WRT v24-sp2 (02/24/10) std.

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

nvram show|grep eth1

eth1_nat=1
pptp_ifname=eth1
eth1_multicast=0
eth1_ipaddr=0.0.0.0
wan_ifname2=eth1
lan_ifnames=eth0 eth1 ath0
eth10_ipaddr=0.0.0.0
wan_default=eth1
wan_ifnames=eth1
eth1_mtu=1500
eth1_bridged=1
wan_iface=eth1
eth1_netmask=0.0.0.0
wan_ifname=eth1

Interesting, that, ifconfig eth1 shows:

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.

Respect guys![/quote]
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Thu Mar 25, 2010 18:54    Post subject: Reply with quote
new betas out now
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
yurkesh
DD-WRT Novice


Joined: 08 Mar 2010
Posts: 5

PostPosted: Sun Mar 28, 2010 15:33    Post subject: Reply with quote
Hm. Does it seem helpful enough for ya?

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.
volod
DD-WRT Novice


Joined: 07 Oct 2010
Posts: 1

PostPosted: Thu Oct 07, 2010 9:33    Post subject: Reply with quote
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)

Thank you
generalmilk
DD-WRT Novice


Joined: 25 Aug 2011
Posts: 10

PostPosted: Sat Aug 27, 2011 13:35    Post subject: Reply with quote
same problem here, use lastest build. It's amazing this is still not solved.
_________________
WR841N v7.2
DD-WRT brainslayer 17201
generalmilk
DD-WRT Novice


Joined: 25 Aug 2011
Posts: 10

PostPosted: Sat Aug 27, 2011 16:28    Post subject: Reply with quote
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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum