[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 2 Netze über 2 Router via VPN verbinden



Am Mit, 2003-09-10 um 20.14 schrieb Sven Gehr:
> > iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -j MASQUERADE
> > change it to something like:
> > iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -d \!
192.0.2.128/29
> > -j MASQUERADE
> 
> Ich benutze den iptables Befehl:
> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> 
> mir ist nicht ganz klar wie ich diese modifizieren muß bzw. was die
hier 
> verwendete destination, welche auch noch negiert ist bedeutet.
> 
> Gruß Sven

iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -d \!
192.0.2.128/29 -j MASQUERADE

-s(ource) bedeutet: alle packets mit quell-IP 10.0.0.* 
-d(estination) bedeutet: alle packets die NICHT "\!" ziel-IP
192.0.2.127-128 haben

das heisst also, bei -s und -d jeweils die Gegenstellen gegengleich
eintragen (bzw. bei einem Gesamt-Netz einfach die Super-Netmask negiert
eintragen.

hoffe das klappt so.

Marius


-- 
Linux is like a wigwam: No Gates, no Windows, but Apache inside! :-)
--
UN*X S*X
{look;find;talk;grep;touch;finger;find;flex;unzip;mount;workbone;
fsck;yes;gasp;fsck;yes;eject;umount;makeclean;zip;split;done;exit}
--



Reply to: