access public network with laptop -> ethernet -> nxpBoard -> 5GModem -> public network
by louloulou from LinuxQuestions.org on (#5HCSZ)
Hello,
I have a nxpBoard which has a 5GModem and an ethernet port. This nxpBoard can connect to the public network through the 5gModem.
I connect a laptop to the ethernet port of the nxpBoard and I would like to have access to the public network, on the laptop.
summary:
laptop -> ethernet -> nxpBoard -> 5GModem -> public network
The nxpboard has two interface eth0:192.168.1.1 and 5Gmoden (wwan:100.104.102.249)
The laptop has one interface (eth)enp5s0:192.168.1.2
the nxpobard can ping www.google.com and the laptop
the laptop can ping the nxpboard but cannot ping www.google.com
I don't understand what I'm missing. Bellow is my configuration.
Thank you,
On nxpboard
# ifconfig
Code:eth0 Link encap:Ethernet HWaddr 00:04:9F:06:EF:C6
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:9fff:fe06:efc6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3328 (3.2 KiB) TX bytes:3124 (3.0 KiB)
wwan0 Link encap:Ethernet HWaddr EE:11:9D:37:87:28
inet addr:100.104.102.249 Bcast:0.0.0.0 Mask:255.255.255.252
inet6 addr: fe80::ec11:9dff:fe37:8728/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1428 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1849 (1.8 KiB) TX bytes:2982 (2.9 KiB)# route
Code:Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 100.104.102.250 0.0.0.0 UG 0 0 0 wwan0
8.8.8.0 100.104.102.250 255.255.255.0 UG 0 0 0 wwan0
100.104.102.248 * 255.255.255.252 U 0 0 0 wwan0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0# iptables -L -v
Code:Chain INPUT (policy ACCEPT 36 packets, 3180 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
11 756 ACCEPT all -- eth0 wwan0 anywhere anywhere
1 60 ACCEPT all -- wwan0 eth0 anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 42 packets, 3392 bytes)
pkts bytes target prot opt in out source destinationOn the Laptop
laptop-GE66:~$ ifconfig
Code:enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6261:6c92:3e99:20ae prefixlen 64 scopeid 0x20<link>
ether 2c:f0:5d:b5:a4:30 txqueuelen 1000 (Ethernet)
RX packets 28 bytes 2264 (2.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 301 bytes 25115 (25.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xa1200000-a12ffffflaptop-GE66:~$ route -n
Code:Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 20100 0 0 enp5s0
10.45.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ogstun
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 ogstun
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp5s0
I have a nxpBoard which has a 5GModem and an ethernet port. This nxpBoard can connect to the public network through the 5gModem.
I connect a laptop to the ethernet port of the nxpBoard and I would like to have access to the public network, on the laptop.
summary:
laptop -> ethernet -> nxpBoard -> 5GModem -> public network
The nxpboard has two interface eth0:192.168.1.1 and 5Gmoden (wwan:100.104.102.249)
The laptop has one interface (eth)enp5s0:192.168.1.2
the nxpobard can ping www.google.com and the laptop
the laptop can ping the nxpboard but cannot ping www.google.com
I don't understand what I'm missing. Bellow is my configuration.
Thank you,
On nxpboard
# ifconfig
Code:eth0 Link encap:Ethernet HWaddr 00:04:9F:06:EF:C6
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:9fff:fe06:efc6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3328 (3.2 KiB) TX bytes:3124 (3.0 KiB)
wwan0 Link encap:Ethernet HWaddr EE:11:9D:37:87:28
inet addr:100.104.102.249 Bcast:0.0.0.0 Mask:255.255.255.252
inet6 addr: fe80::ec11:9dff:fe37:8728/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1428 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1849 (1.8 KiB) TX bytes:2982 (2.9 KiB)# route
Code:Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 100.104.102.250 0.0.0.0 UG 0 0 0 wwan0
8.8.8.0 100.104.102.250 255.255.255.0 UG 0 0 0 wwan0
100.104.102.248 * 255.255.255.252 U 0 0 0 wwan0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0# iptables -L -v
Code:Chain INPUT (policy ACCEPT 36 packets, 3180 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
11 756 ACCEPT all -- eth0 wwan0 anywhere anywhere
1 60 ACCEPT all -- wwan0 eth0 anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 42 packets, 3392 bytes)
pkts bytes target prot opt in out source destinationOn the Laptop
laptop-GE66:~$ ifconfig
Code:enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6261:6c92:3e99:20ae prefixlen 64 scopeid 0x20<link>
ether 2c:f0:5d:b5:a4:30 txqueuelen 1000 (Ethernet)
RX packets 28 bytes 2264 (2.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 301 bytes 25115 (25.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xa1200000-a12ffffflaptop-GE66:~$ route -n
Code:Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 20100 0 0 enp5s0
10.45.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ogstun
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 ogstun
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp5s0