| 2 Jun 2025 |
emily | wait systemd-networkd supports it natively? everything I saw implied no | 11:33:21 |
hexa | I think the important bit is KeepConfiguration, since the PPP tunnel configures IPv4 by itself | 11:33:22 |
emily | or is this just separate to the glue to make pppd run at the right time? | 11:33:28 |
hexa | no, it just adds config on top of the ppp interface that pppd creates | 11:33:36 |
emily | right | 11:33:45 |
hexa | networkd reacts to interface creation | 11:33:49 |
emily | I guess you just need that + making the pppd service run whenever the underlying link comes up | 11:34:06 |
emily | was just wondering if NM might be better-integrated somehow | 11:34:16 |
hexa | * "60-ppp0" = {
matchConfig.Type = "ppp";
networkConfig = {
IPv6AcceptRA = true;
DHCP = "ipv6";
KeepConfiguration = true;
};
dhcpV6Config = {
WithoutRA = "solicit";
PrefixDelegationHint = "::/56";
};
ipv6SendRAConfig = {
Managed = true;
};
linkConfig.RequiredForOnline = "routable";
};
| 11:34:20 |
hexa | certainly not | 11:34:24 |
emily | also yeah I've been reading pppd config files and experiencing true suffering | 11:34:52 |
hexa | I don't remember it integrating with pppd | 11:34:57 |
emily | I assume NM's PPPoE support just wraps it anyway though | 11:34:58 |
hexa | age.secrets."ppp-credentials".file = ../../agenix/ppp-credentials.age;
services.pppd = {
enable = true;
peers."1und1" = {
config = ''
debug
plugin pppoe.so
nic-enp1s0
file ${config.age.secrets."ppp-credentials".path}
mtu 1500
mru 1500
maxfail 0
novj
+ipv6
noauth
defaultroute
persist
noaccomp
default-asyncmap
lcp-echo-interval 30
lcp-echo-failure 4
#lcp-echo-adaptive
lcp-max-configure 10
'';
};
};
| 11:35:19 |
emily | https://networkmanager.dev/docs/api/latest/settings-pppoe.html implies it does | 11:35:59 |
emily | (but doesn't look very rich) | 11:36:14 |
emily | ty :) | 11:36:19 |
hexa | oh, it's called DSL/PPPoE in the list | 11:36:41 |
hexa | and yeah, the config looks too simple | 11:37:17 |
emily | yes. it sure would make sense if you only used PPPoE on DSL, and didn't also carry it over to FTTP. wouldn't it | 11:37:18 |
emily | that would be a great world we could live in :P | 11:37:27 |
emily | I discovered this gem:
root@OpenWrt:~# cat /etc/ppp/filter
#
# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
#
19
48 0 0 0
21 0 16 1
40 0 0 2
21 0 13 33
48 0 0 13
21 0 5 1
40 0 0 10
69 9 0 8191
177 0 0 4
80 0 0 4
21 6 7 8
21 0 5 6
40 0 0 10
69 3 0 8191
177 0 0 4
80 0 0 17
69 1 0 4
6 0 0 4
6 0 0 0
| 11:38:10 |
emily | which appears to be either a hand-written or compiled BPF program represented in decimal | 11:38:25 |
emily | that I don't know what it's doing but it horrifies me that it's even there | 11:38:35 |
hexa | well, that's a pcap filter expression right at the top 🤔 | 11:39:04 |
hexa | not ping and not tcp rst? | 11:40:25 |
emily | no idea what it's doing in /etc/ppp, couldn't find where it's referenced | 11:40:48 |
hexa | * not ping and not tcp rst? | 11:40:53 |
emily | environment = {
# pppd likes to write directly into /var/run. This is rude
# on a modern system, so we use libredirect to transparently
# move those files into /run/pppd.
LD_PRELOAD = "${pkgs.libredirect}/lib/libredirect.so";
NIX_REDIRECTS = "/var/run=/run/pppd";
};
| 11:48:48 |
emily | why would you not just patch it… T_T | 11:49:05 |