Possible to exclude some devices from vpn pptp tunnel ?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page Previous  1, 2
Author Message
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Tue Feb 28, 2017 14:13    Post subject: Reply with quote
I tried it, but the problem is that the nvram variable: pptp_get_ip is empty:

Quote:
root@R6400:~# nvram show | grep pptp_get_ip
size: 37003 bytes (94069 left)
pptp_get_ip=


so the script hangs, I have used the instructions from PIA: https://www.privateinternetaccess.com/pages/client-support/dd-wrt-pptp which gets me a working VPN Sad

Edit with a different server I now get pptp_get_ip=10.1.1.10

I will investigate further

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Tue Feb 28, 2017 16:49    Post subject: Reply with quote
This is my syslog:
Quote:
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + SRC_NET=
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: 192.168.1.99 #laptop
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + DST_NET=
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + TID=200
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + [ -z 10.1.1.10 ]
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:34:18 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:34:18 R6400 user.info : klogd : kernel log daemon successfully stopped
Feb 28 17:34:18 R6400 kern.notice kernel: klogd: exiting
Feb 28 17:34:18 R6400 user.info : resetbutton : resetbutton daemon successfully stopped
Feb 28 17:34:18 R6400 user.info : syslogd : syslog daemon successfully stopped
Feb 28 17:34:18 R6400 syslog.info syslogd exiting
Feb 28 17:34:18 R6400 syslog.info syslogd started: BusyBox v1.24.2
Feb 28 17:34:18 R6400 user.info : klogd : klog daemon successfully started
Feb 28 17:34:18 R6400 kern.notice kernel: klogd started: BusyBox v1.24.2 (2017-02-26 19:08:27 CET)
Feb 28 17:34:20 R6400 kern.info kernel: br0: port 2(eth1) entered forwarding state
Feb 28 17:34:20 R6400 kern.info kernel: br0: port 1(vlan1) entered forwarding state
Feb 28 17:34:28 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:34:28 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:28 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:34:28 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:34:38 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:34:38 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:38 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:34:38 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:34:39 R6400 daemon.notice pppd[1630]: pppd 2.4.7 started by root, uid 0
Feb 28 17:34:48 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:34:48 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:48 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:34:48 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:34:51 R6400 user.info : vpn modules : vpn modules successfully unloaded
Feb 28 17:34:54 R6400 daemon.info dnsmasq-dhcp[1134]: DHCPREQUEST(br0) 192.168.1.101 08:ed:b9:33:b7:eb
Feb 28 17:34:54 R6400 daemon.info dnsmasq-dhcp[1134]: DHCPACK(br0) 192.168.1.101 08:ed:b9:33:b7:eb vostro3360
Feb 28 17:34:58 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:34:58 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:34:58 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:34:58 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:08 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:08 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:08 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:08 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:18 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:18 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:18 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:18 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:28 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:28 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:28 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:28 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:38 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:38 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:38 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:38 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:48 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:48 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:48 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:48 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:35:58 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:35:58 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:35:58 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10
Feb 28 17:35:58 R6400 user.notice .rc_startup[1386]: + sleep 10
Feb 28 17:36:08 R6400 user.notice .rc_startup[1386]: + ip route show
Feb 28 17:36:08 R6400 user.notice .rc_startup[1386]: + nvram get pptp_get_ip
Feb 28 17:36:08 R6400 user.notice .rc_startup[1386]: + grep 10.1.1.10


nvram show | grep pptp"
Quote:


root@R6400:~# nvram show | grep pptp
pptpd_mtu=1436
pptpd_client_options=
pptpd_client_srvsub=0.0.0.0
size: 40497 bytes (90575 left)
pptpd_dns1=
pptpd_dns2=
pptp_iptv=0
pptp_server_ip=5.157.7.58
pptpd_forcemppe=1
pptpd_bcrelay=0
pptp_use_dhcp=1
pptpd_client_srvip=ro.privateinternetaccess.com
pptp_ifname=vlan2
pptpd_client_ipparam=
pptpd_client_srvsec=mppe required,no40,no56,stateless
pptpd_radserver=0.0.0.0
pptpd_radpass=
pptpd_enable=0
pptpd_client_mtu=1436
pptpd_client_srvsubmsk=0.0.0.0
pptp_get_ip=10.1.1.10
pptp_pass=0
pptpd_radius=0
pptpd_client_srvmru=1436
pptpd_rip=
pptpd_radport=1812
pptpd_wins1=
pptpd_wins2=
pptpd_client_srvpass=xxxxxxx
limit_pptp=0
pptp_server_name=sweden.privateinternetaccess.com
pptpd_conn=64
pptpd_client_srvmtu=1436
# name: ddwrt-pptp-redirect-vpn-to-wan.sh
while [ -z "$(nvram get pptp_get_ip)" ]; do sleep 10; done;
while ! ip route show | grep "$(nvram get pptp_get_ip)"; do sleep 10; done
pptpd_client_enable=1
pptpd_client_srvuser=xxxxxx
pptpd_acctport=1813
pptpd_client_nat=1
pptp_extraoptions=mppe required,no40,no56,stateless
pptp_reorder=1
pptpd_mru=1436
pptp_wan_gateway=192.168.0.1
pptpd_auth=
pptp_encrypt=1
pptpd_lip=
pptpd_client_mru=1436


ip route show:

Quote:
root@R6400:~# ip route show
default dev ppp0 scope link
default via 192.168.0.1 dev vlan2
5.254.103.2 via 192.168.0.1 dev vlan2 src 192.168.0.2
10.1.1.1 dev ppp0 proto kernel scope link src 10.1.1.11
127.0.0.0/8 dev lo scope link
169.254.0.0/16 dev br0 proto kernel scope link src 169.254.255.1
192.168.0.0/24 dev vlan2 proto kernel scope link src 192.168.0.2
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1



ip rule show (as script is not running no table 200):

Quote:
root@R6400:~# ip rule show
0: from all lookup local
32766: from all lookup main
32767: from all lookup default


As a quick and dirty workaround I have commented the following line from the script:
#while ! ip route show | grep "$(nvram get pptp_get_ip)"; do sleep 10; done

Now the script is running and working as advertised Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Alexja
DD-WRT Novice


Joined: 31 Jan 2017
Posts: 22

PostPosted: Tue Feb 28, 2017 22:51    Post subject: Reply with quote
egc wrote:
As a quick and dirty workaround I have commented the following line from the script:
#while ! ip route show | grep "$(nvram get pptp_get_ip)"; do sleep 10; done

Now the script is running and working as advertised Smile


Hello

... works fine !

Very Happy
Alexja
DD-WRT Novice


Joined: 31 Jan 2017
Posts: 22

PostPosted: Tue Feb 28, 2017 23:00    Post subject: Reply with quote
Many thanks to the 2 dd-wrt guru eibgrad and egc.

Very Happy
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Wed Mar 01, 2017 6:56    Post subject: Reply with quote
@Eibgrad awesome work.
A big thanks.I totally agree openvpn is the way to go.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Alexja
DD-WRT Novice


Joined: 31 Jan 2017
Posts: 22

PostPosted: Wed Mar 01, 2017 21:42    Post subject: Reply with quote
Alexja wrote:
egc wrote:
As a quick and dirty workaround I have commented the following line from the script:
#while ! ip route show | grep "$(nvram get pptp_get_ip)"; do sleep 10; done

Now the script is running and working as advertised Smile


Hello

... works fine !

Very Happy


Crying or Very sad

I am very sorry

I do not know what happened

does not work


Embarassed
Alexja
DD-WRT Novice


Joined: 31 Jan 2017
Posts: 22

PostPosted: Wed Mar 01, 2017 22:23    Post subject: Reply with quote
eibgrad wrote:
..... But if you can, I recommend just abandoning PPTP in favor of OpenVPN.


for streaming openvpn isn't too much slow?
Alexja
DD-WRT Novice


Joined: 31 Jan 2017
Posts: 22

PostPosted: Wed Mar 15, 2017 22:27    Post subject: Reply with quote
eibgrad wrote:
FYI. I rewrote the script entirely. Once I got into fixing the problem, I decided it could use some other improvements.

https://pastebin.com/tssTvC5Q .....


hello again

can i post my configuration ?...I'm not able to run the script and i do not understand where I'm wrong.

Embarassed
Quartz
DD-WRT Novice


Joined: 28 Mar 2019
Posts: 4

PostPosted: Sun May 30, 2021 10:53    Post subject: Reply with quote
So did eibgrad remove all of his posts in this thread? That's not good at all. Could anyone repost his script?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sun May 30, 2021 11:11    Post subject: Reply with quote
There was a glitch in the database and all his posts were deleted Sad

The script should be on Pastebin I hope @eibgrad will chime in, I have this script but there might be a new version, that said pptp is old and unsafe and should not be used any more, OpenVPN and WireGuard are better Smile

But of course sometimes you have no choice, one warning, pptp does not seem to work in all builds Sad

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sun May 30, 2021 13:49; edited 1 time in total
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14246
Location: Texas, USA

PostPosted: Sun May 30, 2021 11:41    Post subject: Reply with quote
It wasn't a glitch. It was MY error; there was no backup of the forum database prior to the error, so there was no way to restore the forum posts. Forum backups are now done regularly because of this. Also, the web archive does not have any history of this thread, but if you copied or highlighted the proper part of the (now fixed) link:

https://pastebin.com/tssTvC5Q

I fixed the previous post, so the link is now clear for you... Rolling Eyes

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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