I'm trying to setup proper ip forwarding within a DHCP subnet generated through a host with two different netowrk adapters.
My current situation is the following:
First node with two networks adapters, the first one connected to a WAN, the second one responsible for generating a subnet through DHCP. Here the DHCP configuration (the host identified as master should be the gateway):
subnet 10.142.0.0 netmask 255.255.255.0 { interface enp0s31f6; option routers 10.142.0.1; option subnet-mask 255.255.255.0; option domain-search "net.local"; option broadcast-address 10.142.0.255; option domain-name-servers 8.8.8.8; range 10.142.0.20 10.142.0.100; } host master{ hardware ethernet d4:5d:df:1a:26:40; fixed-address 10.142.0.1; } host node01 { hardware ethernet d4:5d:df:13:69:42; fixed-address 10.142.0.2; } host node02{ hardware ethernet d4:5d:df:13:69:45; fixed-address 10.142.0.3; }Added iptables rules following the answer provided here
The nodes get the IP correctly and I can ssh to them. Ping to external hosts works fine, but when I try to resolve a host name I get name or service unknown error. Is it possibile that I have to set up IP tables rules even for DNS lookup?
Thank in advance!
EDIT:
Trying to CURL a GOOGLE IP directly I got No route to host anyway
curl http://216.58.205.131
curl: (7) Failed connect to 216.58.205.131:80; No route to host
while if I ping it everything works as expected
ping 216.58.205.131
PING 216.58.205.131 (216.58.205.131) 56(84) bytes of data.
64 bytes from 216.58.205.131: icmp_seq=1 ttl=54 time=23.7 ms
64 bytes from 216.58.205.131: icmp_seq=2 ttl=54 time=20.0 ms
64 bytes from 216.58.205.131: icmp_seq=3 ttl=54 time=19.9 ms