diff --git a/cmd/modemmenu/pool.go b/cmd/modemmenu/pool.go index 398ccfd..72014b4 100644 --- a/cmd/modemmenu/pool.go +++ b/cmd/modemmenu/pool.go @@ -30,8 +30,8 @@ type pppPoolSettings struct { dns []netip.Addr // offered to the callers (ms-dns), at most 2 } -// pppPoolMax: a range larger than this is a typo, not a pool -const pppPoolMax = 4096 +// pppPoolMax: a range larger than this (a /16) is a typo, not a pool +const pppPoolMax = 65536 // loadPPPPool: [ppp_pool], checked; no range: no pool func loadPPPPool(sec *config.Section) (pppPoolSettings, error) { diff --git a/dialup/dialup.conf.sample b/dialup/dialup.conf.sample index 5866ddc..1df191b 100644 --- a/dialup/dialup.conf.sample +++ b/dialup/dialup.conf.sample @@ -15,8 +15,8 @@ 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: 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 +SUBNET=100.120.224.0/19 +SERVER_ADDR=100.120.224.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 c8fa0fa..b36acb6 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/100.77.0.1 -#address=/login.icq.com/100.77.0.1 +#address=/login.oscar.aol.com/100.120.224.1 +#address=/login.icq.com/100.120.224.1 # AOL's client (TCP 5190) -#address=/americaonline.aol.com/100.77.0.1 +#address=/americaonline.aol.com/100.120.224.1 # MSN Messenger (TCP 1863), WebTV's Messenger too -#address=/messenger.hotmail.com/100.77.0.1 +#address=/messenger.hotmail.com/100.120.224.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/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 +#address=/scs.msg.yahoo.com/100.120.224.1 +#address=/scsa.msg.yahoo.com/100.120.224.1 +#address=/vcs1.msg.yahoo.com/100.120.224.1 +#address=/vcs2.msg.yahoo.com/100.120.224.1 +#address=/insider.msg.yahoo.com/100.120.224.1 +#address=/filetransfer.msg.yahoo.com/100.120.224.1 +#address=/relay.msg.yahoo.com/100.120.224.1 +#address=/login.yahoo.com/100.120.224.1 diff --git a/dialup/dnsmasq.conf b/dialup/dnsmasq.conf index fe075d8..7f88c04 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=100.77.0.1 +listen-address=100.120.224.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/100.77.0.1 +address=/bbs.dialup/100.120.224.1 # the overrides for the services we provide: every *.conf here # (services.conf, and a file per front end) diff --git a/docs/dialup-network.md b/docs/dialup-network.md index fe91bfb..1d8b3ad 100644 --- a/docs/dialup-network.md +++ b/docs/dialup-network.md @@ -9,7 +9,7 @@ files are in [`dialup/`](../dialup); `make install-dialup` installs them. ``` caller ── modem ── D-Modem ── modemmenu ── pppd ── ppp0 ┐ │ VRF "dialup" (table 77) - 100.77.0.1: DNS, BBS, front ends ─┤ 100.77.0.0/24 + 100.120.224.1: DNS, BBS, front ends ─────┤ 100.120.224.0/19 └─ egress: eth0.77 (VLAN), eth0 (NAT) or none ``` @@ -17,9 +17,9 @@ caller ── modem ── D-Modem ── modemmenu ── pppd ── ppp0 ┐ ``` [ppp_pool] -local = 100.77.0.1 -range = 100.77.0.10-100.77.0.250 -;dns = 100.77.0.1 +local = 100.120.224.1 +range = 100.120.224.10-100.120.255.254 +;dns = 100.120.224.1 ``` A PPP command that names `{ppp_remote}` (or `{ppp_local}`, `{ppp_dns}`, @@ -42,14 +42,14 @@ command = exec /usr/sbin/pppd nodetach noauth local lock passive {ppp_local}:{pp `MODEM_PPP_DNS` and `MODEM_PPP_DNS2`. - A full pool refuses the call ("all N PPP addresses are in use"). - D-Modem's own `[ppp]` profile runs pppd without modemmenu, so it has - no pool: give it a fixed pair outside `range` (100.77.0.2 to .9). + no pool: give it a fixed pair outside `range` (100.120.224.2 to .9). Pick a subnet none of the host's networks use. The sample's, -100.77.0.0/24, is in 100.64.0.0/10, the shared address space of RFC 6598 +100.120.224.0/19 (8,190 addresses), is in 100.64.0.0/10, the shared address space of RFC 6598 (carrier-grade NAT): home and office LANs don't use it, so it doesn't clash with them. Tailscale also hands out addresses in 100.64.0.0/10: on a host that runs it, check `tailscale status` for a clash, or pick -another /24. +another range. ## Isolation: `modemmenu-dialup` @@ -60,13 +60,13 @@ up, from `/etc/modemmenu/dialup.conf`: it, so the host's routes, and its LANs, are not theirs. A lookup that finds nothing there is unreachable; it never falls through to the host's table. -- **`dialup0`**, a dummy interface holding `SERVER_ADDR` (100.77.0.1), so +- **`dialup0`**, a dummy interface holding `SERVER_ADDR` (100.120.224.1), so the DNS server has its address while no caller is on. - **An egress** (`EGRESS`): - `vlan`: `UPLINK.VLAN_ID` (`eth0.77`), in the VRF, with its own address and gateway. Dial-up traffic leaves on a VLAN of its own and never shares the host's LAN. `NAT=no` when the router on that VLAN - routes 100.77.0.0/24 back itself. + routes 100.120.224.0/19 back itself. - `uplink`: out of the host's interface through its gateway, masqueraded. Simpler, and filtered like the VLAN. - `none`: no internet; the host's services only. @@ -79,7 +79,7 @@ up, from `/etc/modemmenu/dialup.conf`: - callers are isolated from each other: anything from one caller to `SUBNET` (another caller) is dropped, before and whatever `ALLOW_CIDRS` says. They still meet in the host's services (the BBS, - the messengers) on 100.77.0.1. + the messengers) on 100.120.224.1. - onward: `BLOCK_CIDRS` are dropped (every private range, link-local and multicast, by default), so the host's LANs are out of reach, except `ALLOW_CIDRS`, which the sysop opens: @@ -93,7 +93,7 @@ up, from `/etc/modemmenu/dialup.conf`: - a source address outside `SUBNET` is dropped, and IPv6 too. - `net.ipv4.ip_forward=1`, and `tcp_l3mdev_accept`/`udp_l3mdev_accept`, so the host's services (listening in no VRF) answer callers on - 100.77.0.1. + 100.120.224.1. pppd's `ip-up.d/modemmenu-dialup` moves a link whose local address is `SERVER_ADDR` into the VRF, putting it on the firewall's list first; @@ -104,7 +104,7 @@ VRF, its routes and the callers' links. ## DNS: `modemmenu-dns` -`modemmenu-dns.service` runs dnsmasq inside the VRF, on 100.77.0.1 only, +`modemmenu-dns.service` runs dnsmasq inside the VRF, on 100.120.224.1 only, with [`dnsmasq.conf`](../dialup/dnsmasq.conf): no DHCP, upstream servers of its own (the host's `127.0.0.53` is not in the VRF), and the names of this system under `.dialup` (`bbs.dialup`). @@ -118,7 +118,7 @@ the rest). A front end can drop its own file instead: ``` # /etc/modemmenu/dns.d/oscar.conf -address=/login.oscar.aol.com/100.77.0.1 +address=/login.oscar.aol.com/100.120.224.1 ``` `address=/name/ip` answers the name and every name under it. Then diff --git a/docs/reference.md b/docs/reference.md index c99486b..211ee14 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -207,9 +207,9 @@ The PPP callers' addresses: a command that names {ppp_remote} (or {ppp_local}, { | key | sample | what it does | |---|---|---| -| `local` | `100.77.0.1` | See the section above. | -| `range` | `100.77.0.10-100.77.0.250` | See the section above. | -| `dns` | `100.77.0.1` | See the section above. | +| `local` | `100.120.224.1` | See the section above. | +| `range` | `100.120.224.10-100.120.255.254` | See the section above. | +| `dns` | `100.120.224.1` | See the section above. | ## `[autoppp]` diff --git a/freepbx/README.md b/freepbx/README.md index b47bd53..c056045 100644 --- a/freepbx/README.md +++ b/freepbx/README.md @@ -101,8 +101,8 @@ detection off; D-Modem's line check page lists what is still in the way. ## The menu - **PPP**: dial-up networking. `apt install ppp` first. Each caller - gets an address of `[ppp_pool]` (100.77.0.10 to .250, the server is - 100.77.0.1). For DNS, the internet and keeping callers off your LAN, + gets an address of `[ppp_pool]` (100.120.224.10 to 100.120.255.254, the server is + 100.120.224.1). For DNS, the internet and keeping callers off your LAN, `make install-dialup` ([the dial-up network](../docs/dialup-network.md)). Windows' Dial-Up Networking logs in with PAP instead of at the prompt: turn on `[autoppp]` and install diff --git a/freepbx/modemmenu.conf b/freepbx/modemmenu.conf index 0ef35e4..37d59d7 100644 --- a/freepbx/modemmenu.conf +++ b/freepbx/modemmenu.conf @@ -85,8 +85,8 @@ max_sessions = 8 ; the PPP callers' addresses, one each (several lines at once): see ; docs/dialup-network.md for their network, DNS and firewall [ppp_pool] -local = 100.77.0.1 -range = 100.77.0.10-100.77.0.250 +local = 100.120.224.1 +range = 100.120.224.10-100.120.255.254 ; Windows' Dial-Up Networking starts PPP at once and logs in with PAP. ; enabled = yes takes those callers to pppd, with the login checked against diff --git a/samples/modemmenu.conf.sample b/samples/modemmenu.conf.sample index 2220053..6027373 100644 --- a/samples/modemmenu.conf.sample +++ b/samples/modemmenu.conf.sample @@ -262,9 +262,9 @@ max_sessions = 32 ; host's networks use. No range: no pool. The scripts see MODEM_PPP_LOCAL, ; MODEM_PPP_REMOTE, MODEM_PPP_DNS and MODEM_PPP_DNS2 [ppp_pool] -local = 100.77.0.1 -range = 100.77.0.10-100.77.0.250 -;dns = 100.77.0.1 +local = 100.120.224.1 +range = 100.120.224.10-100.120.255.254 +;dns = 100.120.224.1 ; AutoPPP: a dialer that starts PPP at once (Windows' Dial-Up Networking, ; most others) sends a PPP frame where the login prompt wants a name; then