Cannot ping the Internet, DNS, other hosts in my NW

Valentina2209

New Member
Jan 2, 2024
2
0
1
hi guys,
I'm trying my hand at networking, but I've run into a problem where I can't ping a machine or the internet.

What I have done myself so far (which could be the source of the problem):
i have set up a netplan for my gateway server (sudo nano /etc/netplan/00-installer-config.yaml)

I have set net.ipv4.ip_forward=1 with sudo nano /etc/sysctl.conf. And I set the SNAT POSTROUTING rule with the command sudo iptables -t nat -A POSTROUTING ! -d 10.100.10.0/24 -o enp0s10 -j SNAT --to-source 192.168.20.2
my external interface is enp0s10 and my internal interface is enp0s8.

I have set up a webserver with the netplan

Now to my problem which is in the title: i can't ping my DNS servers (8.8.8.8, 9.9.9.9) nor google.com or deb.debian.org or anything else. Does anyone have an idea where my error could be?

when i enter ping google.com in proxmox on my gateway server, i get the following error message: temporary failure in name resolution. When I try to ping 8.8.8.8, I get network is unreachable. Why is this happening?
 

Attachments

  • netplan gateway.png
    netplan gateway.png
    38.1 KB · Views: 23
  • netplan webserver.png
    netplan webserver.png
    27 KB · Views: 22
Something that directly jumps out: You assigned the IP 10.100.10.0 to your gateway-server, but that is not a valid IP. The subnet 10.100.10.0/24 has valid IPs from 10.100.10.1 to 10.100.10.254 - the first and last address are special and not 'free'.

Try changing it to 10.100.10.1 - and the same on the default route on your webserver.
 
you are absolutely right, thanks for the hint! i changed both addressen now - on the gatewayserver as well as on the webserver, i updated the netplan with sudo netplan apply, but the problem is still not solved. Do you have any other suggestions?