I intend to pass Internet from openSUSE Leap 15.1 to CentOS 7:
- openSUSE Leap 15.1 machine with access to Internet through a wireless router
- CentOS 7 machine without access to Internet due to lack of proper wireless chip driver
I connect openSUSE machine to CentOS by an Ethernet cable. My understanding is that I should have two different sub-nets:
- openSUSE
- Has static IP address of
192.168.2.252/24
- Has DHCP IP address of
192.168.1.51/24
- Access to Internet through
192.168.1.1
- Access to Internet through
- Has static IP address of
- CentOS
- Has static IP address of
192.168.2.251/24
- Has static IP address of
Observations
- Inside CentOS
192.168.2.251
I can ping openSUSE192.168.2.252
- Inside CentOS
192.168.2.251
I can ping openSUSE192.168.1.51
- Inside CentOS
192.168.2.251
I can not ping internet router192.168.1.1
- Inside CentOS
192.168.2.251
I can not ping1.1.1.1
- Inside CEntOS
192.168.2.251
I do not have access to Internet
Routing on openSUSE
> ip route
default via 192.168.1.1 dev wlan0 proto dhcp metric 600
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.51 metric 600
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.252 metric 100
Question
I cannot figure out what is wrong with routing. It's strange that from CentOS I can ping openSUSE on both sub-nets, but I cannot ping internet router!
sysctl
to enable it permanently. – berndbausch Mar 13 '21 at 03:12sudo sysctl net.ipv4.ip_forward
I'm gettingnet.ipv4.ip_forward = 1
. I think IP forwarding is enabled. – Megidd Mar 13 '21 at 14:09ip route
output summary isdefault via 192.168.1.1
and192.168.1.1
and192.168.2.0/24 src 192.168.2.251
– Megidd Mar 13 '21 at 14:58ip route
to the question? – berndbausch Mar 13 '21 at 15:03