2

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!

Best, Jan

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 sudo route

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

Output of 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 

Output of 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         

Output of 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         
4
  • 1
    You can always bridge interfaces. – Rui F Ribeiro Jan 3 '18 at 21:09
  • It's possible your "embedded" is on a different subnet than the rest of your network. What is the IP address of "embedded" ? ... and... What is the routing table in the Jetson? sudo route and/or ip route – RubberStamp Jan 3 '18 at 21:16
  • Looks like the NetworkManager-configured connection sharing probably uses routing and maybe NAT, so sudo iptables -L -vn (paying attention to the FORWARD chain and any other chains called by it) and sudo iptables -L -vn -t nat are probably highly relevant. – telcoM Jan 3 '18 at 21:51
  • Thanks for your replies! Bridging seems to be exactly what I want. I updated my post with the outputs you requested. – Jan B. Jan 4 '18 at 11:28
0

You can use OpenVPN (maybe also other software if you do not need encryption) to create tap interfaces on both systems. You can then bridge the tap interface to the WLAN interface (I have no idea whether that is possible with NetworkManager) and use the tap interface on the other system as if it was an WLAN interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.