Networking in mol running on a firewalled machine
Geert Janssens
mol-general@lists.maconlinux.org
Thu, 30 May 2002 19:12:19 +0200
Geert Janssens wrote:
>
>
> samuel@ibrium.se wrote:
>
>> The tun0 interface should have its own network address. For instance,
>> when I used my mac box as a gateway for the local network, I used
>> the following configuration:
>>
> Yes, that was it ! I used the same 192.168.0.1 address for both the
> tun0 device and my eth0. I changed the ifconfig entry in the tunconfig
> script and now all works fine.
>
> I chose 192.168.0.2 as ip address, so the tun0 device gets the same
> ruling in my firewall.
>
> Thanks for your fast response,
>
> Geert Janssens
Hmm, I was wrong. Using 192.168.0.2 was ok for mol to work, but the rest
of my lan suddenly was of the internet. This is because the nat table I
had got changed by starting mol.
So I redid my setup to what Samuel suggested:
Use the default tunconfig, i.e.
ifconfig tun0 192.168.1.1
and the two iptables entries with 192.168.1.0/24 in them.
In mol, I configured my interface as 192.168.1.2 and the default gateway
as 192.168.1.1.
This seems to work finally. My lan pc's can access the net, and so does
mol. It seems I didn't need the additional iptables filter commands.
Maybe because the the OUTPUT chain's default policy is accept already ?
Thanks for the good advice.
Geert