I’m trying to set up a home router on Ubuntu 20.04 Server.
I have followed dozens of on-line tutorials, and for the life of me, I can’t get this to work.
As soon as I get everything set up, nothing works.
Internet –> CableModem –> DualPortNIC(Top) –> DualPortNIC(Bottom) –> 24PortSwitch –> Other PC’s/Devices
1/ The Dual Port NIC is set up (via Netplan) to have the “Top” port as DHCP, it get a proper IP address from my ISP.
2/ The Dual Port NIC is set up (via Netplan) to have the “Bottom” port as Static, it gets three IP addresses assigned.
1/ 192.168.1.1 (Gateway)
2/ 192.168.1.2 (DNS)
3/ 192.168.1.3 (NTP) (I need to re-set this up, I have rebuilt this server 12 times)
3/ I have enable IPv4 forwarding in sysctl.conf
4/ There is a NIC on the MotherBoard of this server set with a static IP address (via Netplan) of 192.168.1.61.
5/ DNSMasq is set up and appears to be functioning properly. Most devices on my network are setup to obtain their IP address, Gateway and DNS via DHCP. DNSMasq is handing out the proper addresses to devices.
6/ I WAS able to do a (CLI) speedtest (sitting at the PC with a monitor and keyboard) and got good results.
7/ I have tried both using UFW and/or IPTables in many different configurations/tutorials. All without success.
It seems as soon as I try setting up IPTables rules and/or NAT, things stop functioning. I can’t ping anything outside of my network via hostname OR IP Address.
Sometimes, I can’t even ping things on my internal network.
So, my questions are:
1/ Is there a way to TEST to see if packets are able to move between the two ports on the Dual Port NIC?
2/ Is there a SIMPLE way to set things up just to see if it will even work. I’m not even concerned with firewall/packet filtering for a test at this point. I just want to be able from the other PC’s/Devices on my network, get out to the internet.
3/ I would like to know how to PROPERLY set up IPTables for my setup.
Because I don’t which direction to go next, I am not including and config files in this post.
If you need to see any config files or output from tests, please don’t hesitate to ask, I will be more then happy to add them as needed.