Estou preparando o roteador do ubuntu com 2 interfaces
enp2s0 (Connected to ISP WAN)
enp2s8 (internal LAN network and DHCP server and DNS server)
minha configuração de interface (/ etc / network / interfaces) é:
auto enp2s8
iface enp2s8 inet static
address 192.168.5.1
netmask 255.255.255.0
broadcast 192.168.5.255
allow-hotplug enp2s0
auto enp2s0
iface enp2s0 inet static
address 192.168.5.111
netmask 255.255.255.0
gateway 192.168.5.5
dns-nameserver 8.8.8.8 8.8.4.4
route
dá:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.5.5 0.0.0.0 UG 0 0 0 enp2s0
192.168.5.0 * 255.255.255.0 U 0 0 0 enp2s0
192.168.5.0 * 255.255.255.0 U 0 0 0 enp2s8
ip route
dá:
default via 192.168.5.5 dev enp2s0 onlink
192.168.5.0/24 dev enp2s0 proto kernel scope link src 192.168.5.111
192.168.5.0/24 dev enp2s8 proto kernel scope link src 192.168.5.1 linkdown
Não consigo acessar a Internet pela interface enp2s8 . ping -I enp2s8 google.com
dá:
PING google.com (202.51.65.52) from 192.168.5.1 enp2s8: 56(84) bytes of data.
From olerouter.olenepal.local (192.168.5.1) icmp_seq=1 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=2 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=3 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=4 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=5 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=6 Destination Host Unreachable
From olerouter.olenepal.local (192.168.5.1) icmp_seq=7 Destination Host Unreachable
mas ping -I enp2s0 google.com
de saídas:
PING google.com (202.51.67.32) from 192.168.5.111 enp2s0: 56(84) bytes of data.
64 bytes from cache.google.com (202.51.67.32): icmp_seq=1 ttl=59 time=1.45 ms
64 bytes from cache.google.com (202.51.67.32): icmp_seq=2 ttl=59 time=1.32 ms
Sou novo no UFW e não posso encaminhar o IP entre as interfaces. Agradecemos antecipadamente