"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

iptables: forward

dio 19.06.2004 - 15:00 647 7
Posts

dio

Here to stay
Registered: Nov 2002
Location: Graz
Posts: 4788
folgende zeile will nicht funktionieren:

iptables -t nat -A FORWARD -i eth0 -o eth1 -p tcp -m multiport --dport 80 -j DNAT --to 192.168.17.2:80

folgende fehlermeldung:

iptables: No chain/target/match by that name

ich hoff mir kann wer helfen, hab bereits einige irc channel abgeklappert, aber bis jetzt konnte mir keiner helfen, bzw einen fehler entdecken.

ps:
iptables -t nat -A PREROUTING -i eth0 -p tcp -m multiport --dport 80 -j DNAT --to 192.168.17.2:80

nimmt er, in der iptables liste scheint es allerdings nicht auf.
Bearbeitet von dio am 20.06.2004, 15:08

Troy

amateur
Avatar
Registered: Feb 2002
Location: Wien
Posts: 4390
nur zum verständnis - du willst von eth0 auf eth1 durchrouten?

2te frage:
Zitat
--dport 80 -j DNAT --to 192.168.17.2:80

wennst eh schon destination-port angibst, sollte sich --to 192.168.17.2:80 erübrigen. - wird wahrscheinlich nicht der fehler sein, aber -.... :D

dio

Here to stay
Registered: Nov 2002
Location: Graz
Posts: 4788
ohne portangabe bei --to funktionierts nicht, da krieg ich a syntax fehlermeldung :)

zu frage 1: ja

edit: in manpages steht auch, man soll noch mal den port angeben :)

edit2: ok, hast recht, i hab nur vorher -t nat vergessn :D

dennoch, port 80 wird einfach ned durchgeroutet :(
Bearbeitet von dio am 19.06.2004, 15:12

atrox

in fairy dust... I trust!
Avatar
Registered: Sep 2002
Location: HTTP/1.1 404
Posts: 2782
heißt das nicht --to-destination statt --to ?

dio

Here to stay
Registered: Nov 2002
Location: Graz
Posts: 4788
Zitat von atrox
heißt das nicht --to-destination statt --to ?
hatte ich auch schon probiert, kommt allerdings die gleiche fehlermeldung. :(

Neo-=IuE=-

Here to stay
Registered: Jun 2002
Location: Berndorf, NÖ
Posts: 3229
iptables -A FORWARD -i $IFACE_EXT -o $IFACE_INT -p tcp -m multiport --dport $PORTS_TCP -d $DEST_HOST -j ACCEPT

i hab a script mal wo gfunden und da steht das hier drinnen für die weiterleitung von TCP ports
probiers mal so
$DEST_HOST ist nur die IP des rechners OHNE port

dio

Here to stay
Registered: Nov 2002
Location: Graz
Posts: 4788
is das das script vom darkangel?

auf jeden fall big thx neo :) funktioniert jetzt!

Neo-=IuE=-

Here to stay
Registered: Jun 2002
Location: Berndorf, NÖ
Posts: 3229
# Kleine Paketfilterfirewall von Sebastian Heinlein
# 2003 - glatzor at pimpzkru.de

das steht im script drinnen, weiß nimma woher i des hab ;)
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz