0

I am trying to install Arch Linux on a device that is connected to the Internet via WiFi only.

The WiFi adapter is not listed in iwd (device list), while the WiFi adapter works in MX Linux live stick.

Thus, I tried to connect to the internet using my WiFi-enabled laptop by using IP Masquerade.

I set static IPs in the same subnet (192.168.n.i for the laptop and 192.168.n.i+1 for the PC I want to install on) for both devices and set default via 192.168.n.i dev <iface> in the archiso console via

ip route add 192.168.n.i dev <iface>
ip route add default via 192.168.n.i

Then I set iptables rules on the laptop:

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -I FORWARD -o eth0 -d 192.168.0.0/16 -j ACCEPT
sudo iptables -I INPUT -s 192.168.0.0/16 -j ACCEPT;

The two devices seem to be able to ping each other, and when using tcpdump on the laptop, I do see pings from archiso to 8.8.8.8, but the answer is never routed back. Pings from archiso to laptop show up in tcpdump, but pings from laptop to archiso don't show up in tcpdump of the archiso, even though the ping doesn't show any package loss.

IP forwarding is enabled on the WiFi-enabled laptop: net.ipv4.ip_forward = 1

How to correctly IP masquerade via terminal to share WiFi connection of a mobile device to a stationary?

or alternatively:

What other solutions are there to make the installation work without ethernet?

1 Answer 1

0

I just figured that the IP forwarding requires to reload the settings via sysctl -p. Thus, the solution described above does work fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .