Re: ethertap (for mol) in 2.4.x ?


Subject: Re: ethertap (for mol) in 2.4.x ?
From: Derrik Pates (dpates@andromeda.dsdk12.net)
Date: Mon Feb 05 2001 - 07:48:06 MST


On Mon, 5 Feb 2001, R Shapiro wrote:

> This worked ok with 2.2 kernels. In 2.4, ethertap is considered
> obsolete. There's still kernel code available and it still seems to
> work in a limited way, but it doesn't work at all with mol, at least
> as far as I can see. It's possible the ethertap is ok and I've gotten
> the nat wrong, since I'm now using iptables instead of ipchains and
> I'm not really familiar with nat in iptables (see below). But I don't
> think that's the source of the problem.
>
> My question is, can ethertap be used in this way in 2.4? If it can't,
> is there another solution?

Try the dummy net device. That seems to work better.

>
>
> Fwiw, my old ipchains nat rules were as follows:
>
> ipchains -M -S 7200 10 160
> ipchains -A forward -i $DEVICE -s $LOCALNET -j MASQ
> ipchains -A output -i $LOCALDEV -s $ANY -d $LOCALNET -j ACCEPT
> ipchains -A input -i $LOCALDEV -s $LOCALNET -d $ANY -j ACCEPT
>
>
> The new iptables rules are
>
> iptables -t nat -A POSTROUTING -o $DEVICE -s $LOCALNET -j MASQUERADE
> iptables -A OUTPUT -o $LOCALDEV -s $ANY -d $LOCALNET -j ACCEPT
> iptables -A INPUT -i $LOCALDEV -s $LOCALNET -d $ANY -j ACCEPT
>
> I also tried replacing the first iptables rule with:
>
> iptables -t nat -A POSTROUTING -o $DEVICE -s $LOCALNET -j SNAT --to $IPADDR
>
>
>
> $DEVICE is eth0, $ANY is any/0, LOCALDEV is tap0, LOCALNET is
> 192.168.1.0/24, IPADDR is the eth0 address, which comes from a dhcp
> server. The final two rules in both cases are there so that my
> firewall doesn't block the localnet traffic.
>
>
>
> The ethertap is configured via
>
> ifconfig tap0 192.168.1.1 netmask 255.255.255.0 up arp
> route add -host 192.168.1.1 tap0
>
> --
> reshapiro@mediaone.net
>

Derrik Pates | Sysadmin, Douglas School| _ #linuxOS on EFnet
dpates@dsdk12.net | District (dsdk12.net) | | | and now OPN too!
   Student @ South Dakota School of Mines | __| |___ _ _ _ ___ _ _ ____
       & Technology (www.sdsmt.edu) |/ _ / -_) ' \ '\/ _ \ ' \ (____)
UNIX: Because you want to USE your computer.|\___,\___|_||_||_\___/_||_|



This archive was generated by hypermail 2a24 : Mon Feb 05 2001 - 07:48:46 MST