PPTP on unstable internet connection

2 Fast@2704 ,openwrt 19, pptp server - wifi---3g--ppoe --- pptp client .
Unstable link between server and the client pockets lost sometimes so the client gets disconnected ,server ppp0 interface goes down and the local route for this connection disappeares .
How to make the pptp server create the route when client gets connected with new ppp interface

Connection lost ppp interface down and local route for ppp to lan disappeares
Connection is up new ppp1 interface is up but no route for this one

How to make permanent route automatic route between ppp and lan when ppp is up

I use (pptp server )route add -net 192.168.44.0/24 gw 192.168.6.1 command to repair ,it helps but with new disconnect it disappears.

I believe ppp is just a name for ptp interface in my router but I am not sure , also is there any routers in this word that can give at least WiFi 20Mbits on openwrt ?

Also how to disable or reduce all encryption for this pptp so the efficiency of the connection would be highest

1 Like

Try to configure the route using UCI syntax:
https://openwrt.org/docs/guide-user/network/routes_configuration

If that doesn't work, add it dynamically:
https://openwrt.org/docs/guide-user/base-system/hotplug

Also, consider using modern VPN protocols such as WireGuard.

1 Like

The thing is I don't need any encryption at all
All I need is local connection via Internet like one server with static IP and 3-10 clients behind NAT like 3g 4g PPoE etc .
I looked through internet and it says that pptp is fastest and simplest VPN.
What is the best for unstable unencrypted fastest vpn server which can work even behind NAT?

1 Like

I'm not sure about PPTP, but you can disable encryption when using OpenVPN.
Moreover, there are multiple other methods to set up a tunnel without encryption.

However note that some ISPs use traffic shaping which can significantly affect performance.
In some cases it's so bad that an unencrypted tunnel might be even slower than an encrypted one.

1 Like

You lose the routing, because when the ppp interface goes down, the IP address 192.168.6.1 disappears. I would suggest you to make a script, which pings an always available IP address from network 192.168.44.0/24 – for example 192.168.44.1. If the router cannot ping the address, the script will add a static route. Put it in the root directory:

vi /root/pptp.scr

#!/bin/sh
if ! /bin/ping -c 2 192.168.44.1; then
/sbin/route add -net 192.168.44.0/24 gw 192.168.6.1
fi
exit 0

chmod 755 /root/pptp.scr

Make cron execute the script every minute:

crontab –e

*\1 * * * * /root/pptp.scr

About the wireless performance, option noscan helps a lot:

vi /etc/config/wireless

config wifi-device 'radio0'
option htmode 'HT40'
option noscan '1'

1 Like

Спасибо ! That would be handy to know how to make ping checker so I can run about anything if there is no ping
What wifi speed do you have on your router and what is the model of the router you have , I actually tried option HTmode but it haven't tried it on new firmware version which is 19.07

It's an AP TL-WA801nd v5 with OpenWrt 19.07.5, r11257-5090152ae3.
Without option noscan - about 20Mb/s
With noscan - 50Mb/s

1 Like

That method is generally problematic:

  • Private ranges can be routable by the ISP, so ping check is unreliable.
  • Ping should have the deadline key specified, otherwise it might wait for replies forever.
  • There's no point to trigger crontab every minute and check anything, since you can simply use hotplug or pppd-specific scripts on the interface activation.
1 Like

I believe he ment ping inside the tunnel to a local host .
Yeah hotplug sound nice I think I will try that method but firs I have to try HT parameter for wifi

Nope HT40 still doesn't work and I just started to think maybe my router Fast@2407 does not have the mode

It's a problem of the br43 driver:
https://wireless.wiki.kernel.org/en/users/drivers/b43

Known problems & limitations:
No support for 802.11n features (HT, aggregation, 40 MHz width)

There seems to be nothing you can do ...

1 Like

MPPE required, but MS-CHAP[v2] auth not performed.
Connection terminated.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
peer from calling number 192.168.10.225 authorized
MPPE required, but MS-CHAP[v2] auth not performed.
Connection terminated.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
peer from calling number 192.168.10.225 authorized
MPPE required, but MS-CHAP[v2] auth not performed.
Connection terminated.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
peer from calling number 192.168.10.225 authorized
MPPE required, but MS-CHAP[v2] auth not performed.
Connection terminated.
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
No matter what I do in on Windows XP or options.pptpd log says the same
Server always requires MPPE? And there is no way to turn it down

It's common practice to drop support for vulnerable options in order to minimize source and binaries.

Router with Kenectik interface can do it I think I will just use Kenectik it has all the options work

There is config for pptp /etc/ppp/options.pptpd
and there is nothing about MPPE at all but
In /var/etc/options.pptpd almost the same options except one last parameter
mppe required , no40,no56...
and if I comment this line I can connect with chap and no encryption ( and it is great )
But after rebooting # disappeared and again I can't connect with no encryption
How do I make this line constantly with # ?

Also strange thing if I comment lines in /etc/ppp/options.pptpd all the lines got commented in /var/etc/options.pptpd except last one , I tried to delete the line but after rebooting the same line appears

This is part of the init script, so you need to modify it:

# Server
sed -i -r -e "/^(require|refuse)-/s/^/#/" /etc/ppp/options.pptpd
sed -i -e "/^\s*echo.*mppe\s/s/^/#/" /etc/init.d/pptpd
/etc/init.d/pptpd restart

# Client
sed -i -e "/^mppe\s/s/^/#/" /etc/ppp/options.pptp
ifup vpn
1 Like

This is part of init script ? But where is this init script so I can find it ? What is the name of the script ?
I see commands that edit files but if you do
/etc/init.d/pptpd restart the parameter mppe will be back

Run the commands and check again.

1 Like

I will ,of cause , I hope I will try it tomorrow and then I learn what the sed command can do

1 Like

Haha it works ! This is grate I actually lost my hope but now I found .(thanks to You you are real pro )
So I actually can make any encryption now
Like i can make it 40 or 56 just for the sake of authication like mschapv2 won't work with no encryption. Now I need mschap2 with 40 bit encryption chap is not secure at all and mschap can be hacked I should have known it before ,
So I need to allow mppe on server with mppe 40 and make client connection with mppe 40 as well

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.