MOL & TCP/IP + DHCP = ?

mol-general@lists.maconlinux.org mol-general@lists.maconlinux.org
Sun, 21 Apr 2002 12:34:11 +0200


On Sat, Apr 20, 2002 at 08:03:34PM -0600, Keary Suska wrote:
> Quoted from the MOL developer:
> 
> > Indeed. The TUN/TAP device must be configured at runtime.
> > Currently mol runs the script '/usr/lib/mol/bin/tunconfig'
> > (if it exists). The following config file works for me:
> > 
> > ---------------------------------------------------------------
> > #!/bin/bash
> > /sbin/ifconfig tun0 192.168.1.1
> > /sbin/iptables -D POSTROUTING -t nat -s 192.168.1.0/24 -d ! 192.168.1.0/24 -j
> > MASQUERADE >& /dev/null
> > /sbin/iptables -t nat -s 192.168.1.0/24 -d ! 192.168.1.0/24 -A POSTROUTING -j
> > MASQUERADE
> > echo 1 > /proc/sys/net/ipv4/ip_forward
> > ---------------------------------------------------------------
> > 
> > The /etc/molrc file should contain
> > 
> > netdev:    tun0 -tun
> > 
> > and optionally (for AppleTalk)
> > 
> > netdev: eth0 -sheep
> > 
> > The MacOS TCP/IP panel should be configured according to
> > 
> > IP:        192.168.1.2
> > Netmask:    255.255.255.0
> > Gateway:    192.168.1.1
> > 
> > TUN/TAP as well as iptables and masquerading needs to be on in the
> > kernel.

Nowdays, the script has to be specified in /etc/molrc:

tunconfig_script:       /home/samuel/bin/tunconfig

If no firewalls are used, the above should do nicely. 

> In my experience, it can take a minute or two or longer for the Mac OS to
> get an IP using DHCP under MOL. I don't know why, if this is a MOL problem
> or something with my ISP. But if you don't get immediate results, it may be
> worth waiting a few minutes to see if TCP/IP eventually comes up.

This could be due to the IP-filtration MOL performed in MOL (the idea is
to only propagate IP-packets addressed to MOL and discard all packets
addressed to Linux). Something to investigate...

Cheers,

/Samuel