internet sharing... with LAN access

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
Quirken
Level 1
Level 1
Posts: 24
Joined: Sat Nov 13, 2010 8:42 am

internet sharing... with LAN access

Post by Quirken » Sat May 05, 2018 2:06 am

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!

Post Reply

Return to “Other networking topics”