Recently in Simferopol I connected to the provider FarLine, which, unfortunately, distributes the Internet in the private sector only through pppoe. I didn’t like it from the very beginning, I didn’t like it, but there was simply no alternative for my area, except through the telephone.

With the setting itself, there were no problems. I started sudo pppoe-setup and specified the user there interactively, the interface (enp0s10) found the Found a RFC 2516 compliant modem, congratulations! :) Found a RFC 2516 compliant modem, congratulations! :) , demand value later specifying no , since when yes never possible to connect, DNS when left by default, when overwriting Google, it didn’t affect connection progress, the password was specified, later in /etc/ppp/pap-secrets controlled the correctness of the login and password, and disable the firewall 0. To be honest, why and how in the pppoe firewall at the connection level I have no idea. I already have iptables (SuseFirwall2) running, all interfaces are defined as external, and only the ports that I use and are used are open, so I don’t see any sense in one other trunk. And here is the long-awaited sudo pppoe-start command, which was supposed to make me happy, but later brought only disappointment and nervousness after more than a few dozen re-creation of configs via pppoe-setup and attempts to connect, and then force it to work in systemd. :-(

The point is this. When I successfully connected for the first time through pppoe-start it pppoe-start me in stdout, at first glance, the correct activity. But all subsequent times, with any configurations and any result of the connection, the console now gives only that.

 sudo pppoe-start ................TIMED OUT /usr/sbin/pppoe-start: line 193: 3719 Terminated $CONNECT "$@" > /dev/null 2>&1 

At the same time, sometimes the connection is established during ping (appearing points at the beginning), and sometimes not, but the console output is now always the one that ends at the end with a timeout, even if the connection is successfully established. :-(

It would seem, well, the dog with him, let him give what he wants, the main thing, because the connection is established and not broken, but it was not there. I want it to be automatically installed and create a system /usr/lib/systemd/system/pppoe.service in systemd .

 [Unit] Description=PPPoE <--> ppp0 over enp0s10 After=network.target Wants=network.target [Service] Type=forking ExecStart=/usr/sbin/pppoe-start ExecStop=/usr/sbin/pppoe-stop PIDFile=/var/run/pppoe.conf-pppoe.pid.pppoe [Install] WantedBy=multi-user.target 

Later I tried both single and oneshot . I tried not all types, but the result is 1. When you start the network ( wicked ), the connection is established, but after receiving a timeout from the pppoe-start process, systemd , as it is expected from it, and quite correctly and correctly, it kills the hell mother and as a result of the connection. It cannot even occur to him, more precisely to the algorithm, that this is the normal behavior of this process and it should be so, in the case of me too.

I tried to remove the /etc/ppp and /etc/ppp.d folders and reinstall the ppp and rp-pppoe packages, and re-configure via pppoe-setup , but the result was the same.

Here is the contents of the /etc/ppp/pppoe.conf configuration file cleared of comments.

 ETH='enp0s10' USER='my_correct_login' DEMAND=no DNSTYPE=NOCHANGE PEERDNS=no DNS1= DNS2= DEFAULTROUTE=yes CONNECT_TIMEOUT=30 CONNECT_POLL=2 ACNAME= SERVICENAME= PING="." CF_BASE=`basename $CONFIG` PIDFILE="/var/run/$CF_BASE-pppoe.pid" SYNCHRONOUS=no CLAMPMSS=1412 LCP_INTERVAL=20 LCP_FAILURE=3 PPPOE_TIMEOUT=80 FIREWALL=NONE LINUX_PLUGIN= PPPOE_EXTRA="" PPPD_EXTRA="" 

It seems to me that something is blocking the definition of the connection on the equipment of the provider, or maybe I have not properly configured pppoe .

Help me figure out this question, and / or tell me how to write a systemd unit for such a crooked case, so that it performs an automatic connection and does not break it when receiving a timeout from the parent process?

I will provide any configuration information for analyzing the situation without any problems. :-)

    2 answers 2

    Understood! :-)

    rp-pppoe uses the netstat and ifconfig utilities for network analysis. They are still provided in openSUSE in the net-tools-deprecated package.

    sudo zypper in ppp rp-pppoe net-tools-deprecated

    With demand=yes still does not work, but now with demand=no the pppoe-start script gives a joyful line 'Conected!' and ends. :-)

    Consequently systemd oneshot true and all things are going! :-)

    /usr/lib/systemd/system/pppoe.service

     [Unit] Description=PPPoE <--> ppp0 over enp0s10 After=network.target Wants=network.target [Service] Type=oneshot RemainAfterExit=true ExecStart=/usr/sbin/pppoe-start ExecStop=/usr/sbin/pppoe-stop [Install] WantedBy=multi-user.target 

    sudo systemctl daemon-reload && sudo systemctl enable pppoe.service && sudo systemctl start pppoe.service

      In SUSE, from version 12, the console tools for pppoe are broken. They are not going to repair them and they send everyone to NetworkManager.

      • It is only in Suse? And if rp-pppoe from the source code to collect, or is it not only in this package? - Ilya Indigo
      • And did not any of these "senders" advise you just to run sudo zypper in net-tools-deprecated ? Although this is a common thing for the Russian-speaking openSUSE forum, it’s for this very reason that I created the topic here, not there. - Ilya Indigo
      • @Ilya Indigo, the thing is, you made a bike. The standard solution to version 12 was to configure this case via yast. In version 12, the setting through yast was broken and sent to everyone in NetworkManager. Your bike solves this problem bypassing yast, that's all. - gbg