Re: masquerading (internet router)
On Mon, 30 Jun 2003, [nirdezneb] wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hallo achim,
>
> > Sieht eigentlich ganz gut aus.
> > Wie sieht denn route -n aus? (router, client)
>
> danke für die schnelle antwort!
>
> router:
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 217.5.98.46 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> 0.0.0.0 217.5.98.46 0.0.0.0 UG 0 0 0 ppp0
>
> client:
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 0.0.0.0 192.168.0.2 0.0.0.0 UG 0 0 0 eth0
>
> hm, die vom router sieht irgendwie nicht richtig aus, oder? aber warum?
Ist richtig.
Entweder liegts dann an der Namens-Aufloesung (versuch mal eine ip
anzupingen) oder musst Du noch als Voreinstellung bei ipchains ACCEPT auf
alle chainses geben:
Hier mal mein Skript zum masquarieren:
twix:~# cat /firewall/masquariere.sh
#!/bin/sh
INTERFACE=ppp0
#forwarden erlauben
echo 1 > /proc/sys/net/ipv4/ip_forward
# Vorherbestehende Regeln aus den Chains löschen.
ipchains -F
# Voreinstellung: Pakete durchlassen.
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward ACCEPT
#masquarieren
ipchains -A forward -i $INTERFACE -j MASQ
(ipchains -L -n zeigt die aktuellen Regeln)
Mehr weiss ich auch nicht.
Gruss Achim
Reply to: