|
# /etc/systemd/system/pppoe@.service |
|
# Bring up a PPPoE connection on a given interface |
|
|
|
# Install using `systemctl enable pppoe@vlan10.service` |
|
# Needs /etc/ppp/peers/vlan10 to exist and be configured correctly |
|
|
|
[Unit] |
|
Description = PPPoE connection for %I |
|
Documentation = man:pppd(8) |
|
BindsTo = sys-devices-virtual-net-%i.device |
|
After = sys-devices-virtual-net-%i.device |
|
PartOf = sys-devices-virtual-net-%i.device |
|
AssertPathExists = /etc/ppp/peers/%I |
|
|
|
[Service] |
|
Type = notify |
|
ExecStart = /usr/sbin/pppd call %I up_sdnotify |
|
ExecStop = /bin/kill $MAINPID |
|
ExecReload = /bin/kill -HUP $MAINPID |
|
|
|
# Exit statuses |
|
|
|
# pppd terminated because it was sent a SIGINT, SIGTERM or SIGHUP signal. |
|
SuccessExitStatus = 5 |
|
|
|
# The link was established successfully and terminated because it was idle. |
|
SuccessExitStatus = 12 |
|
|
|
# The link was established successfully and terminated because the connect time limit was reached. |
|
SuccessExitStatus = 13 |
|
|
|
# An error was detected in processing the options given, such as two mutually exclusive options being used. |
|
RestartPreventExitStatus = 2 |
|
|
|
# The kernel does not support PPP, for example, the PPP kernel driver is not included or cannot be loaded. |
|
RestartPreventExitStatus = 4 |
|
|
|
# The connect script failed (returned a non-zero exit status). |
|
RestartPreventExitStatus = 8 |
|
|
|
# The peer system failed (or refused) to authenticate itself. |
|
RestartPreventExitStatus = 11 |
|
|
|
# The init script failed (returned a non-zero exit status). |
|
RestartPreventExitStatus = 18 |
|
|
|
# The PPP negotiation failed, that is, it didn't reach the point where at least one network protocol (e.g. IP) was running. |
|
RestartForceExitStatus = 10 |
|
|
|
# Callback was negotiated and an incoming call should arrive shortly. |
|
RestartForceExitStatus = 14 |
|
|
|
# The link was terminated because the peer is not responding to echo requests. |
|
RestartForceExitStatus = 15 |
|
|
|
# The link was terminated by the modem hanging up. |
|
RestartForceExitStatus = 16 |
|
|
|
# We failed to authenticate ourselves to the peer. |
|
RestartForceExitStatus = 19 |
|
|
|
Restart = always |
|
StandardOutput = null |
|
|
|
# Hardening |
|
LockPersonality = yes |
|
MemoryDenyWriteExecute = yes |
|
PrivateTmp = yes |
|
ProtectControlGroups = yes |
|
ProtectHome = yes |
|
ProtectKernelTunables = yes |
|
ProtectSystem = strict |
|
ReadWritePaths = /run/ /etc/ppp/ |
|
RestrictRealtime = yes |
|
SystemCallArchitectures = native |
|
SystemCallFilter = ~@mount |
|
|
|
[Install] |
|
WantedBy = sys-devices-virtual-net-%i.device |