Marc Warne <(E-Mail Removed)> wrote:
> I'm setting up a wireless network for my house and have a question
> concerning what iptables commands to use in this situation:
> +------------------+ +--------------+
> | Linux box | wi-fi | My Linux box |
> | 192.168.1.100 wlan0 <- - - -> wlan0 | 192.168.1.1 |
> +------------------+ | 192.168.0.1 |
> +---------eth1-+
> |
> +----------ea0-+
> | Another comp |
> | 192.168.0.3 |
> +--------------+
> i.e. 'Another comp' connects to My Linux box via ethernet (this is the
> 192.168.0.x subnet). My Linux box then connects to 'Linux box' via wi-fi
> which has the actual internet connection (via USB, wi-fi subnet is
> 192.168.1.x).
> I need to know how to access the internet from 'Another comp'. The packets
> will have to be sent to My Linux box, and then forwarded to 'Linux box'
> in order to reach the internet. I have set the gateway on 'Another comp'
> to 192.168.0.1 so packets reach My Linux box, but I don't know how to then
> forward these over the wireless network.
> My Linux box successfully can access the internet as its default gateway
> is 192.168.1.100 and masquerading is working on 'Linux box'.
I'd try masquerading the 192.168.0.0/24 network on 'My Linux box' so
that the outbound packets to the Internet from 'Another comp' sent to
'My Linux box' are resent to 'Linux box' with the "return IP address"
of 'My Linux box,' 192.168.1.1. I don't know why double masquerading
this way shouldn't work, but if you try it then I'd appreciate knowing
the outcome - either way it goes.
I really don't know iptables as well as I'd like to, but was able to adapt
this script to create a PPP-connection firewall with single masquerading
for computers on a private network without much trouble:
http://iptables-tutorial.frozentux.n...c.firewall.txt
(or
http://www.faqs.org/docs/iptables/ex...UDE.RCFIREWALL)
--
Clifford Kite Email: "echo
xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads:
http://ckite.no-ip.net/
/* On Linux be root, on Windows reboot.
-Josef Müllers */