Narc probleme mit portrouting

Gemeinsam ins Internet mit Firewall und Proxy.
Antworten
Luxus
Beiträge: 52
Registriert: 11.07.2002 18:09:25

Narc probleme mit portrouting

Beitrag von Luxus » 14.07.2002 02:09:15

ich habe mir aus http://www.debianforum.de/forum/viewtopic.php?t=218
mal das narc geholt
vorher benutzte ich ein kleines masq script von einem freund
nach dem ich narc eingerichtet hatte ging es ganz gut
nun wollte ich noch ein paar ports forwarden
leider wird eine ip verlangt aber diese sind ja bei t-dsl dynamisch
wenn ich sie weglasse geht garnix

Code: Alles auswählen

# NARC port forwarding config
#
# If you place this file in a location other than /etc/narc-forward.conf, make sure you change
# FORWARD_CONF in narc.conf
# 
# Add/duplicate the lines below as necessary; there is no hard limit
# Example: PROTOCOL="tcp";ORIGINAL_IP="1.3.5.7";ORIG_PORT="8080";NEW_IP="10.10.42.57";NEW_PORT="80"
#          PROTOCOL="udp";ORIGINAL_IP="1.3.5.7";ORIG_PORT="53";NEW_IP="10.10.42.61";NEW_PORT="53"
# Note: Use port numbers instead of named services from /etc/services

# hab ich gerade vergessen :)
PROTOCOL="tcp";ORIG_IP="80.128.184.207";ORIG_PORT="5031";NEW_IP="192.168.0.2";NEW_PORT="5031"
# ICQ 5010-5018 und direct connect 5019
PROTOCOL="tcp";ORIG_IP="80.128.184.207";ORIG_PORT="5010:5019";NEW_IP="192.168.0.2";NEW_PORT="5010:5019"
# AIM 5190 4443
PROTOCOL="tcp";ORIG_IP="80.128.184.207";ORIG_PORT="5190";NEW_IP="192.168.0.2";NEW_PORT="5190"
PROTOCOL="tcp";ORIG_IP="80.128.184.207";ORIG_PORT="4443";NEW_IP="192.168.0.2";NEW_PORT="4443"
# blubster
PROTOCOL="tcp";ORIG_IP="80.128.184.207";ORIG_PORT="41170:41350";NEW_IP="192.168.0.2";NEW_PORT="41170:41350"
PROTOCOL="udp";ORIG_IP="80.128.184.207";ORIG_PORT="41170:41350";NEW_IP="192.168.0.2";NEW_PORT="41170:41350"
wenn ich die aktuelle ip eintrage funktioniert alles

dann gibt es noch die möglichkeit das portrouting auszustellen und manuelle befehle zu nehmen

Code: Alles auswählen

# aim
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4443 -j DNAT --to 192.168.0.2:4443
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 5190 -j DNAT --to 192.168.0.2:5190

# icq und directconnect
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 5010:5019 -j DNAT --to 192.168.0.2:5010:5019

# blubster
iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 41170:41350 -j DNAT --to 192.168.0.2:41170:41350
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 41170:41350 -j DNAT --to 192.168.0.2:41170:41350
nur funktioniert es dann nicht
habe ich irgendwo einen fehler gemacht oder gibt es doch eine möglichkeit mit dem forwardscript das ganze zu machen trotz dynamischer ip!?

Benutzeravatar
glatzor
Beiträge: 1769
Registriert: 03.02.2002 19:01:46
Wohnort: Vierkirchen bei München

Beitrag von glatzor » 14.07.2002 10:29:46

Du musst die gewünschten Ports auch noch in der INPUT-Chain freigeben.

Der Wildcard für alle ip-Adressen ist "0.0.0.0" oder "0.0.0.0/0" mit Subnetmaskangabe.

Luxus
Beiträge: 52
Registriert: 11.07.2002 18:09:25

Beitrag von Luxus » 14.07.2002 20:26:21

danke "0.0.0.0/0" funktioniert als Orginal ip in der narc-forward.conf

Antworten