I am struggling to finish the config on my Ubuntu 16.04 fileserver to pass on the internet connection to my HTPC. See the network layout below:
[Internet] <--> [DHCP Router] <--> (eno1).[Fileserver].(eno2) <--> [HTPC]
The goal is such that the DHCP router will assign an unique address and to HTPC and the fileserver will pass through any necessary network traffic. Can someone take a look at the below and help me figure out what I am doing wrong?
sudo sysctl -a | grep ip_forward
net.ipv4.ip_forward = 1
sudo iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE
sudo iptables -A FORWARD -i eno1 -o eno2 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eno2 -o eno1 -j ACCEPT