IP Masquerading during installation of Arch Linux
0
votes
1
answer
302
views
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
in the archiso console via
ip route add 192.168.n.i dev
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?**
Asked by kaiya
(222 rep)
Feb 11, 2022, 04:30 AM
Last activity: Feb 11, 2022, 05:03 AM
Last activity: Feb 11, 2022, 05:03 AM