You should have a look at the Networking document in molk Doc folder:
Code:
1. TUN driver
=============
The TUN driver provides networking through the use of an IP tunnel. It is configured
by the line
netdev: tun0 -tun
The network topology will look similar to the following example:
-Ethernet----------------------------------------
| |
130.237.226.234 | 130.237.226.239
eth0 | other_machine
linux
tun0 |
192.168.41.1 |
| virtual
+--- ip-tunnel ------- mol
192.168.41.2
That is, the linux box typically has two configured network interfaces: eth0 and tun0.
The virtual tun network should use local IP addresses (these IP numbers have no meaning
to external hosts).
Unfortunately, mol can not connect to external hosts in the above setup (precisely
because external hosts do not know that the 192.168.1.2 address sits behind the
130.237.226.234 box).
The solution to this problem is NAT (network address translation, also called
IP-masquerading). In this case we want to make it appear as if packets sent from
MOL to an external host really originate from the linux box (an external host know
how to reach 130.237.226.234 and linux forwards packets to MOL whenever appropriate).
MOL normally configures NAT automatically from the /etc/mol/tunconfig script.
For reference, it basically does the following:
/sbin/iptables -t nat -s 192.168.41.0/24 -d ! 192.168.41.1
-A POSTROUTING -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
The client side of the network is usually configured automatically by the built-in
DHCP server. It should look something like the following:
IP: 192.168.41.2
Netmask: 255.255.255.0
Gateway: 192.168.41.1
Nameserver: 192.168.41.1 (or whatever)
By defaul, MOL adds an alias NAT rule which redirects nameserver queries to
the linux host (192.168.41.1) to the first entry in /etc/resolv.conf.
I'm not sure about the second networking line in the start-misc script, but I guess that it should look like this :
route add default gw X.X.X.X dev eth0
where X.X.X.X should be replaced by your gateway/router IP.
I'm only helping my friend to get molk/Tiger networking running on his Pegasos II and he has not tried molk 0.6 yet, so please try it and report back your success or failure, thanks.