Yes, you nailed it
A static IP address works.
I'm not so sure about iptables - I only every touch it about once a year and my memory of actually setting it up is sketchy to say the least. Your command produces this:
Code:
adam@gondolin:~$ sudo iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 5161 packets, 548K bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 2024 packets, 252K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 10421 packets, 783K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 10421 packets, 783K bytes)
pkts bytes target prot opt in out source destination
2390 264K MASQUERADE all -- * ppp0 192.168.0.0/24 0.0.0.0/0
adam@gondolin:~$
Is that postrouting rule enough? I mean, this script always has worked with only minor modifications ever necessary.
ppp is the protocol that sets up the broadband connection with the dsl modem. I never understood it, it always just worked. It somehow creates its own interface based on the NIC it's attached to - enp5s0 - like this:
Code:
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.10 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::e2d5:5eff:fead:b027 prefixlen 64 scopeid 0x20<link>
ether e0:d5:5e:ad:b0:27 txqueuelen 1000 (Ethernet)
RX packets 440848 bytes 442179661 (442.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 321922 bytes 59040287 (59.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xf7200000-f721ffff
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1472
inet xxx.xxx.xxx.xxx netmask 255.255.255.255 destination xxx.xx.11.38
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 434619 bytes 431974248 (431.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 318415 bytes 51910323 (51.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Again like iptables, it's always worked.
So if it is a DNS issue, that points to bind9 - or something else?