Running 22.04 system dual NICs - clean installed 26.04 LTS Desktop. Now no network forwarding happenning
https://askubuntu.com/questions/1566727/running-22-04-system-dual-nics-clean-installed-26-04-lts-desktop-now-no-netwoI was Running 24.04 system. Dual NICs - one to WAN, other to LAN.
Firefox, Thunderbird etc. all working on Windows10 machine attached to LAN.
DHCP, name, samba, iptables servers all working in the Linux box.
Then I did a full backup of the linux box, cleaned and formatted a drive I was using as a mirror for the root disk (only system, no data stored on root disk).
Then I did clean install of 26.04 LTS desktop on that clean disk from a USB stick, installed the netplan 00*.yaml file from my backup shown below.
# This is the network config written by 'subiquity' then edited
network:
ethernets:
# LAN
enp3s0:
dhcp6: false
dhcp4: false
addresses:
- 192.168.1.16/24
nameservers:
addresses:
- 10.0.0.138
search: []
routes:
- to: default
via: 10.0.0.138
# WAN
enp4s0:
dhcp6: false
dhcp4: true
version: 2
Replacing the default file installed from the USB stick.
Then installed the isc-dhcp-server and replaced the conf file with the one from my backup.
=================================================
Tried running sysctl -w net.ipv4.ip_forward=1 and got the response "Cannot find /etc/system.conf", (that's where a lot of answers to an ip_forward question here said to find it), noted that in /etc/systemd, there is a system.conf file, so I put a symbolic link in /etc called system.conf pointing at that file in /etc/systemd thinking that there had been some error in the upgrade.
entered
sudo sysctl -w net.ipv4.ip_forward=1 and
sudo sysctl -p
then ran this script I use for debugging network setups. Just a list of iptables commands which has resulted in unimpeded traffic WAN <--> LAN in the past.
#!/bin/bash
#
# iptablesOpen.sh
#
echo "Opening firewall and allowing everyone ..."
#
iptables -t filter -F
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t filter -P OUTPUT ACCEPT
#
iptables -t nat -F
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P INPUT ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
#
iptables -t mangle -F
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
#
At this point Firefox on the Linux box accesses the WAN and servers such as Amazon with no problems. Running 'tail -f /var/log/syslog' displays the network traffic on the LAN involved with the DHCP server doing its job for the attached Windows 10 desktop.
BUT NO traffic is forwarded through the linux box between the LAN and WAN.
aarnet.edu.au is a VERY reliable server attached to Melbourne University (Australia) but
ping aarnet.edu.au entered on a Windows command line responds with 'cannot reach server' . The same command entered into the linux box receives the expected answers, complete with an IP address but typing 'ping 202.158.207.3 at the Windows command line returns the same negative response.
What have I done wrong?
Peter



