So, what I want to do sounds really simple to me, but I can't find anything about this... I have two computers. One computer has a wifi connection (it's a Nvidia Jetson TX1 running Ubuntu 16.04), the other one (let's call it embedded) only has ethernet and is running Debian stretch 9.2.0. I want the Jetson to share the wifi connection with the embedded so that I can access them as if they were both connected to the wifi, including name resolving and DHCP.
I already managed to make the Jetson share the internet connection (that's really easy with the Ubuntu network manager (refer here), I did not change any settings in the /etc/network.conf in the embedded one). I can ping Google and browse the internet from the embedded one. Now, I can ping the embedded from the jetson (not only with the ip, but also with it's name, like ping embedded) and I can also establish a SSH connection from the jetson to the embedded. I can also establish a SSH connection from my PC to the Jetson, but it is not possible to establish a SSH connection or even ping the embedded one from my PC, neither with it's name nor with it's ip address.
What else is there to configure? Looking forward to your answers!
EDIT: Some clarifications/additions asked for in the comments: Bridging seems to be exactly what I want (I thought sharing the connection is exactly that, but it is not), but I can't get it to work...
My /etc/network/interfaces file looks like this:
# interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto wlan0 iface wlan0 inet dhcp wpa-ssid XXXXXX wpa-psk XXXXXXXXXXXXX auto eth0 iface eth0 inet dhcp auto br0 iface br0 inet dhcp bridge_ports eth0
But if I reboot with these settings, SSH does not work anymore at all (
ssh: connect to host tegra-ubuntu port 22: Connection refused), I need to start it manually with
sudo service ssh start or wait a few minutes...
Routing table in the Jetson
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.111.51 0.0.0.0 UG 0 0 0 wlan0 default * 0.0.0.0 U 1003 0 0 eth0 default * 0.0.0.0 U 1009 0 0 br0 link-local * 255.255.0.0 U 0 0 0 br0 link-local * 255.255.0.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 wlan0 192.168.111.0 * 255.255.255.0 U 0 0 0 wlan0
sudo ip route on the Jetson:
default via 192.168.111.51 dev wlan0 default dev eth0 scope link metric 1003 default dev br0 scope link metric 1009 169.254.0.0/16 dev br0 proto kernel scope link src 169.254.7.196 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.7.196 169.254.0.0/16 dev wlan0 scope link metric 1000 192.168.111.0/24 dev wlan0 proto kernel scope link src 192.168.111.65
sudo iptables -L -vn
Chain INPUT (policy ACCEPT 560 packets, 45656 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 Chain OUTPUT (policy ACCEPT 499 packets, 48192 bytes) pkts bytes target prot opt in out source destination
sudo iptables -L -vn -t nat
Chain PREROUTING (policy ACCEPT 292 packets, 85857 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 1 packets, 60 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 250 packets, 15514 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 250 packets, 15514 bytes) pkts bytes target prot opt in out source destination