From 18d136c8b56923dd215bd4c60498278c890dd97e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 14:52:59 +0000 Subject: [PATCH] dialup: callers on 100.77.0.0/24; empty firewall lists load - the samples' subnet moves to 100.77.0.0/24, in RFC 6598's shared address space, which no home or office LAN uses (Tailscale's caveat noted) - an empty ALLOW_CIDRS (the default) or port list left a stray brace in the nftables rules, so modemmenu-dialup up failed: the set's elements line is now built apart Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRVTwDhoXdaYHRwQ4BT --- dialup/dialup.conf.sample | 7 ++++--- dialup/dns.d/services.conf | 24 ++++++++++++------------ dialup/dnsmasq.conf | 4 ++-- dialup/modemmenu-dialup | 14 ++++++++------ docs/dialup-network.md | 30 +++++++++++++++++------------- docs/reference.md | 6 +++--- freepbx/README.md | 4 ++-- freepbx/modemmenu.conf | 4 ++-- samples/modemmenu.conf.sample | 6 +++--- 9 files changed, 53 insertions(+), 46 deletions(-) diff --git a/dialup/dialup.conf.sample b/dialup/dialup.conf.sample index 039931e..5866ddc 100644 --- a/dialup/dialup.conf.sample +++ b/dialup/dialup.conf.sample @@ -13,9 +13,10 @@ VRF=dialup VRF_TABLE=77 # the callers' subnet: [ppp_pool] range is in it, and its local is -# SERVER_ADDR. Pick one no network of the host uses. -SUBNET=10.77.0.0/24 -SERVER_ADDR=10.77.0.1 +# SERVER_ADDR. Pick one no network of the host uses: 100.64.0.0/10 +# (RFC 6598, carrier-grade NAT) is not a LAN's, though Tailscale uses it. +SUBNET=100.77.0.0/24 +SERVER_ADDR=100.77.0.1 # Where the callers' traffic leaves: # vlan a VLAN of its own on UPLINK (UPLINK.VLAN_ID), with its own diff --git a/dialup/dns.d/services.conf b/dialup/dns.d/services.conf index d9f929c..c8fa0fa 100644 --- a/dialup/dns.d/services.conf +++ b/dialup/dns.d/services.conf @@ -6,22 +6,22 @@ # systemctl reload modemmenu-dns # AIM and ICQ (OSCAR, TCP 5190) -#address=/login.oscar.aol.com/10.77.0.1 -#address=/login.icq.com/10.77.0.1 +#address=/login.oscar.aol.com/100.77.0.1 +#address=/login.icq.com/100.77.0.1 # AOL's client (TCP 5190) -#address=/americaonline.aol.com/10.77.0.1 +#address=/americaonline.aol.com/100.77.0.1 # MSN Messenger (TCP 1863), WebTV's Messenger too -#address=/messenger.hotmail.com/10.77.0.1 +#address=/messenger.hotmail.com/100.77.0.1 # Yahoo! Messenger: the pager (TCP 5050, then 23, 25, 80), the capacity # lookup, rooms and files (HTTP); login.yahoo.com is Y!M 9's HTTPS login -#address=/scs.msg.yahoo.com/10.77.0.1 -#address=/scsa.msg.yahoo.com/10.77.0.1 -#address=/vcs1.msg.yahoo.com/10.77.0.1 -#address=/vcs2.msg.yahoo.com/10.77.0.1 -#address=/insider.msg.yahoo.com/10.77.0.1 -#address=/filetransfer.msg.yahoo.com/10.77.0.1 -#address=/relay.msg.yahoo.com/10.77.0.1 -#address=/login.yahoo.com/10.77.0.1 +#address=/scs.msg.yahoo.com/100.77.0.1 +#address=/scsa.msg.yahoo.com/100.77.0.1 +#address=/vcs1.msg.yahoo.com/100.77.0.1 +#address=/vcs2.msg.yahoo.com/100.77.0.1 +#address=/insider.msg.yahoo.com/100.77.0.1 +#address=/filetransfer.msg.yahoo.com/100.77.0.1 +#address=/relay.msg.yahoo.com/100.77.0.1 +#address=/login.yahoo.com/100.77.0.1 diff --git a/dialup/dnsmasq.conf b/dialup/dnsmasq.conf index bb178bf..fe075d8 100644 --- a/dialup/dnsmasq.conf +++ b/dialup/dnsmasq.conf @@ -5,7 +5,7 @@ # on the callers' side only (dialup.conf's SERVER_ADDR), never the host's # own networks -listen-address=10.77.0.1 +listen-address=100.77.0.1 bind-interfaces pid-file=/run/modemmenu-dns.pid @@ -20,7 +20,7 @@ cache-size=1000 # names of this system: bbs.dialup and the like, answered here only local=/dialup/ -address=/bbs.dialup/10.77.0.1 +address=/bbs.dialup/100.77.0.1 # the overrides for the services we provide: every *.conf here # (services.conf, and a file per front end) diff --git a/dialup/modemmenu-dialup b/dialup/modemmenu-dialup index 485e788..0c6689e 100755 --- a/dialup/modemmenu-dialup +++ b/dialup/modemmenu-dialup @@ -32,24 +32,26 @@ egress_if() { # a list of words as an nft set's elements elems() { echo "$*" | tr -s ' \t' ',' | sed 's/^,//; s/,$//'; } +# a set's elements line, or nothing for an empty list +elements() { local e; e=$(elems "$@"); [ -z "$e" ] || echo "elements = { $e }"; } firewall() { local out allow block tcp udp internet="" out=$(egress_if) # shellcheck disable=SC2153 # INTERNET is dialup.conf's [ -z "$out" ] || [ "$INTERNET" != yes ] || internet="oifname \"$out\" accept" - allow=$(elems "$ALLOW_CIDRS") block=$(elems "$BLOCK_CIDRS") - tcp=$(elems "$HOST_TCP_PORTS") udp=$(elems "$HOST_UDP_PORTS") + allow=$(elements "$ALLOW_CIDRS") block=$(elements "$BLOCK_CIDRS") + tcp=$(elements "$HOST_TCP_PORTS") udp=$(elements "$HOST_UDP_PORTS") nft delete table inet $NFT_TABLE 2>/dev/null || true nft -f - <