Scripting PPPoE dialup

Hi there,

I have a number of setups, where the WAN port of a company VPN gateway is connected to either IPFire’s blue network, alternatively to the LAN of a FritzBox. The VPN gateway establishes an IPsec tunnel between a central office and the network behind the VPN gateway. This network behind the VPN gateway has access to the Internet only through the central office, and no access to the Blue network or FritzBox LAN is possible.

This setup works fine for three out of four offices. Two of them use a FritzBox, two an IPFire as a router towards the Internet.

In the fourth office, using one of the IPFire installations, the VPN tunnel crashes sometimes irrevocably, once the DSL connection was lost for a short time. In other words: once the DSL connection is reestablished, the VPN tunnel does not restart. Even worse: the configuration of the VPN gateway is often lost, and the VPN gateway needs to be reconfigured. In my eyes, this is clearly an issue with the VPN gateway, but should not be linked to IPFire or the DSL service.

The commercial service provider of the VPN gateway now claims, that either the IPFire or the DSL service is “bad” and needs to be exchanged. I refuse to believe this story. Therefore I would like to provide “hard facts” by setting up certain test cases and test results, where the DSL connection should be disconnected for e.g. 1 minute, and then reestablished for 2 minutes. This cycle should be repeated e.g. 100 times. I intend to run such tests in various hardware and network configurations.

Scripting this should be easy, if I knew the commands… What about

ip link set ppp0 up | down

Is this the right approach to start and stop the DSL connection using a script?

Thanks, zargano

You should run:

/etc/init.d/network stop red
/etc/init.d/network start red

That will end the PPP session and reestablish it.

However, I would recommend using IPFire’s VPN features.

1 Like


many thanks for your reply, I will use this.

I would love to use IPFire’s VPN capabilities, but unfortunately I cannot kick out this damned managed company VPN firewall box…

Best, zargano

1 Like