networking on the mac side
Samuel Rydh
mol-general@lists.maconlinux.org
Wed, 30 Oct 2002 11:56:17 +0100
On Tue, Oct 29, 2002 at 06:48:41PM -0500, marco wrote:
> Le Tue, 29 Oct 2002 15:58:36 +0100
> Samuel Rydh <samuel@ibrium.se> écrivait :
>
> > Are you *sure*.
>
> Now I'm not so sure...
> see the old molrc.net in attachment...
>
> Whatever I've replaced ALL the config files.
> Now I have 2 interfaces in macos.
>
> But no internet connection by name or IP.
So, what does iptables tell you when MOL is running? It should
be something like
%iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
mol-ns-redirect tcp -- anywhere tun tcp dpt:domain
mol-ns-redirect udp -- anywhere tun udp dpt:domain
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- tunnet/24 !tunnet/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain mol-ns-redirect (2 references)
target prot opt source destination
DNAT all -- anywhere anywhere to:193.170.117.2
%iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
(where tunnet is 192.168.1.0).
Also check that /proc/sys/net/ipv4/ip_forward is set to 1.
%/sbin/ifconfig
tun0 Link encap:Ethernet HWaddr 00:FF:22:C9:0B:1D
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
...
eth0 Link encap:Ethernet HWaddr 00:0A:27:AB:64:E4
inet addr:193.170.117.51 Bcast:193.170.117.63 Mask:255.255.255.192
...
Regarding dhcp... The default mol tunconfig script (if you are using a recent
MOL version) configures and starts dhcp itsel. If you are already using dhcp
to serve the local network, then you are in trouble. (If dhcpd is already
running then starting a secondary dhcpd server will probably fail.)
The dhcp server can _not_ handle dynamically appearing interfaces,
but has to be restarted (the tunconfig script does this). Moroever, dhcpd
wants to live on all interfaces unless explicitly told otherwise. The
tunconfig invokes dhcpd using something like
/usr/sbin/dhcpd -cf /etc/mol/dhcpd.conf tun0 [tun1 tun2]
I.e., dhcp is only provided for the tun network.
Hope this helps,
/Samuel