internet sharing... with LAN access

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Quirken
Level 1
Level 1
Posts: 26
Joined: Sat Nov 13, 2010 8:42 am

internet sharing... with LAN access

Post by Quirken »

I'm trying to share my wireless internet (wlp6s0) through my ethernet port (enp3s0).

My normal subnet is 192.168.1.___, and my ICS subnet I'm using is 192.168.2.____. I've got this mostly working, as follows (using https://help.ubuntu.com/community/Inter ... ptables.29 as a guide)

Code: Select all

sudo ip addr add 192.168.2.1/24 dev enp3s0
sudo iptables -A FORWARD -o wlp6s0 -i enp3s0 -s 192.168.2.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o wlp6s0 -j MASQUERADE
I've got internet on the remote (Windows) machine now, so it's partially working. However, while I can ping my linux box, the rest of the network doesn't seem to see the windows machine. I suspect this is due to different subnets, but I'm not sure. (More specifically, I have a Steam Link device on the network, and it needs to be able to see the Windows machine.)

Ideally, my linux box (with the wifi card), my windows box (over ethernet), and steam link (over ethernet, but plugged into the router, not my linux box) would all be on the same subnet, but as long as steam link can see the windows box, I'll be happy. (It might be possible, for instance, to use port forwarding somehow to take care of Steam)

I'm not committed to using iptables if there's a better way.

What am I missing?

Thanks for the help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Networking”