[PLUG] Routing and firewalling in one box?

Alex Daniloff alex at daniloff.com
Fri Nov 22 23:35:19 UTC 2002


Russell,
Thank you very much for your response.
Aren't iproute2 tools including routing utilities for 2.2.x kernels
only? 
That's what I red in iproute2 package description.
Since I'm using 2.4.19 kernel, what kernel routing utilities/features
should I use in  this case?

Many thanks in advance.

Alex

-------------------
> >>>>> "Alex" == Alex Daniloff <alex at daniloff.com> writes:
> 
> Alex> OK, If I set subnet mask to 255.255.255.0 for the both
> Alex> 192.168.x.x subnets will these subnets be visible for each
> Alex> other?  If I need to masquerade them on eth0 how these eth1
and
> Alex> eth2 interfaces should be represented?
> 
> Yes, they'll be able to see each other.  Machines on each "span"
will
> have a default gateway of the router.  The router knows all (at
least
> locally).  If you've got the iproute2 tools:
> 
>   IP=/sbin/ip
>   IPTABLES=/sbin/iptables
> 
>   DSL_IF=eth0
>   DSL_IP=63.215.105.xxx  # insert your static IP here
>   DSL_GATEWAY=63.215.105.1
> 
>   LAN_1_IF=eth1
>   LAN_1_IP=192.168.1.1
> 
>   LAN_2_IF=eth2
>   LAN_2_IP=192.168.2.1
> 
>   $IP link set up dev $LAN_1_IF
>   $IP addr add ${LAN_1_IP}/24 broadcast + scope global dev $LAN_1_IF
>         
>   $IP link set up dev $LAN_2_IF
>   $IP addr add ${LAN_2_IP}/24 broadcast + scope global dev $LAN_2_IF
> 
>   $IP link set up dev $DSL_IF
>   $IP addr add ${DSL_IP}/24 broadcast + scope global dev $DSL_IF
> 
> The router has a default gateway (of whatever is your upstream):
> 
>   $IP route add default scope global via $DSL_GATEWAY
> 
> The masquerading is configured relative to the external
> interface, e.g.:
> 
>    $IPTABLES -t nat -A POSTROUTING -o $DSL_IF -j MASQUERADE
> 
> Also, need to make sure forwarding is enabled, e.g.:
> 
>    echo "1" > /proc/sys/net/ipv4/ip_forward
> 
> 
> -- 
> Russell Senior         ``I've seen every kind of critter God ever
made,
> seniorr at aracnet.com      and I ain't never seen a meaner, lower,
more
>                          stinkin' yellow hypocrite than you!'' 
>                                         -- Burl Ives as Rufus
Hennessy
> 
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> 




More information about the PLUG mailing list