Laptop as a bridge for Rock64's internet connection
#1
Hi all!

I've just got a Rock64, burned the official image (minimal Debian), connected to the monitor and the keyboard, launched it and... realized I need an internet connection. For this I can use a laptop (Debian again) connected via WiFi, which has one Ethernet port free. I've got some general descriptions about bridging and routing in Linux having WiFi but nothing worked so far. Say, I have a difficulty to connect to the Ethernet port of the WiFi access point. I believe it's quite a common case. Could someone, please, help me and provide a real case example solving such problem?
Linux rock64 4.4.190-1233-rockchip-ayufan-gd3f1be0ed310 #1 SMP Wed Aug 28 08:59:34 UTC 2019 aarch64 GNU/Linux
#2
I'll specify the details.

There is a WiFi network 192.168.0.0/24 with the access point at 192.168.0.1 and the laptop at 192.168.0.8.

Assume the laptop has to act as a router. Following the aforementioned instructions I've created network 192.168.0.0/24 the the Ethernet interface of the laptop has ip 192.168.2.1. All the commands:

Code:
sudo ifconfig eth0 up
sudo ifconfig eth0 192.168.2.1
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE

Locally, now you can ping both laptop's ips: 192.168.1.8 and 192.168.2.1. The current config is:
Code:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
   link/ether ETH0-MAC brd ff:ff:ff:ff:ff:ff
   inet 192.168.2.1/24 brd 192.168.2.255 scope global eth0
      valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
   link/ether WLAN0-MAC brd ff:ff:ff:ff:ff:ff
   inet 192.168.1.8/24 brd 192.168.1.255 scope global wlan0
      valid_lft forever preferred_lft forever


Then I've set the rock64's Ethernet interface using `nmtui`: ip is 192.168.2.2/24, gateway is 192.168.2.1. From now I can ping local ip 192.168.2.2 but not the gateway. Checking the laptop's arp table I can't see the MAC of the rock64. Hence, I guess, no packets even sent via the cable.

So, the question is... what to do next?
Linux rock64 4.4.190-1233-rockchip-ayufan-gd3f1be0ed310 #1 SMP Wed Aug 28 08:59:34 UTC 2019 aarch64 GNU/Linux
#3
Made a typo at the previous post. The correction is:

Quote:There is a WiFi network 192.168.1.0/24 with the access point at 192.168.1.1 and the laptop at 192.168.1.8
Linux rock64 4.4.190-1233-rockchip-ayufan-gd3f1be0ed310 #1 SMP Wed Aug 28 08:59:34 UTC 2019 aarch64 GNU/Linux
#4
I've solved this issue using the built-in Network Manager of my distro. There I've selected "Shared to others computers" for the wired connection. I've canceled all the changes to all configuration files I made before. That's it, everything works automatically from both sides, the laptop and the Rock64.

However, the manual setup is still a miracle for me.
Linux rock64 4.4.190-1233-rockchip-ayufan-gd3f1be0ed310 #1 SMP Wed Aug 28 08:59:34 UTC 2019 aarch64 GNU/Linux


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 Debian 11 (Bullseye) install problem jbize 7 801 09-04-2022, 11:48 AM
Last Post: ju0n
  MRAA Rock64 support jbize 2 366 07-09-2022, 04:40 AM
Last Post: igorp
  ethernet connection using usb-C gilwood 1 804 12-25-2021, 10:13 AM
Last Post: gilwood
  Newbie unable to connect to internet Derek7 2 1,795 07-16-2021, 12:41 AM
Last Post: Derek7
  Rock64 with Debian netinst usb Bloris 6 6,336 12-03-2019, 12:37 PM
Last Post: madalin
  The differences between Rock64 and RockPro64 phamoanh 1 3,010 06-12-2019, 10:44 PM
Last Post: evilbunny
  Custom Kernel for ROCK64 mayst 2 3,874 01-07-2019, 08:04 AM
Last Post: mayst
Bug Rock64 Login lpninja 1 3,364 10-04-2018, 12:02 AM
Last Post: tllim
  Rock64 suitable for headless TVHeadend install? elsmandino 3 4,868 06-26-2018, 11:37 AM
Last Post: Luke
  Will the Rock64 work as a mobile data storage device? Kennetht 1 2,333 03-29-2018, 10:07 AM
Last Post: xalius

Forum Jump:


Users browsing this thread: 1 Guest(s)