I'm running Debian Bullseye v 11 and I'm trying to set a default route 0.0.0.0/0 for Internet access on a DHCP enabled interface eth0.
Interface eth0 is getting an IP address from the ISP and interface eth1 is DHCP assigning addresses to clients. I need clients to be able to access the internet.
I've tried various configurations I saw online like route add 0.0.0.0/0 gw {hostname} dev eth0, etc but nothing seems to be working.
ip route
default via 71.182.224.1 dev eth0 proto dhcp src 71.182.224.241 metric 100
10.10.57.0/24 dev eth1 proto kernel scope link src 10.10.57.1
71.182.224.0/24 dev eth0 proto kernel scope link src 71.182.224.241 metric 100
Based on the article I was directed to I now have IP forwarding (routing) enabled on the Linux server too:
sysctl net.ipv4.ip_forward = 1
But client machines still can't access the Internet through the Linux server. They can ping interface eth0 and eth1 on the Linux server but they can't ping beyond. Based on my experience with Cisco routers there needs to be a route something like:
0.0.0.0 0.0.0.0 [1/0] via 71.182. 224.241, outside
I know how to do this on Cisco routers but I'm stumped with Linux. Unfortunately I have never used a Linux server as a router so I don't know what the proper routing table would look like. But I must be missing something that is preventing the client workstations from getting out to the Internet through the Linux server.
Can anybody help me with the proper command line syntax for this?