You are not logged in.

  • Login

Dear visitor, welcome to MastersForum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

OLV_Ariovist

Intermediate

  • "OLV_Ariovist" started this thread

Posts: 371

Location: Essen

Occupation: GER

  • Send private message

1

Wednesday, July 7th 2004, 10:33pm

DirectPlay mit iptables?

Ich verzweifle hier

Habe jetzt schon diverse Stunden versucht NAT über iptables hinzubekomen, aber ich finde kein Agegame :(
Meine Netzwerkconfig:

Einen Router (Mandrake 10.0) mit 2 NICs. Eine geht über ein Modem ins Netz, die andere hat 192.168.0.1 fürs LAN. Connection ist shared, ich kann also mit meinem Rechner über den Router ins Netz und Pings laufen in beiden Richtungen.

Was habe ich bisher gemacht:

iptables -t nat -A PREROUTING -i ppp0 -p [tcp|udp] --dport [port|startport:endport] -j DNAT --to-destination 192.168.0.2

und

iptables -A FORWARD -p [tcp|udp] -i ppp0 --dport [port|startport:endport] -d 192.168.0.2 -j ACCEPT


Habe das für tcp 2300.2400, 47624 und für udp 2300:2400, 47624, 6073 gemacht

Jedoch gehts immer noch nicht und ich habe leider auch keinen wirklichen Plan von iptables :(

Hat jemand nen LinuxRouter zuhause, der zudem noch etwas Geduld hat mir zu helfen?

Danke im voraus

Gruß Axel

OLV_Ariovist

Intermediate

  • "OLV_Ariovist" started this thread

Posts: 371

Location: Essen

Occupation: GER

  • Send private message

3

Wednesday, July 7th 2004, 11:03pm

Danke Krümel, jedeoch steht da keine Lösung und die Patch.rtf gibts in meinem AoK Verzeichnis auch nicht...

Imp_Vmax_

Professional

Posts: 766

Occupation: GER

  • Send private message

4

Thursday, July 8th 2004, 4:36pm

bei mir sieht das so aus:

$IPTABLES -A PREROUTING -t nat -i ppp0 -p tcp --dport 2300:2400 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p udp --dport 2300:2400 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p udp --dport 47624 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p tcp --dport 47624 -j DNAT --to 192.168.42.3

OLV_Ariovist

Intermediate

  • "OLV_Ariovist" started this thread

Posts: 371

Location: Essen

Occupation: GER

  • Send private message

5

Thursday, July 8th 2004, 8:02pm

welche Distro hast du?

Ich glaube ich habe einen Ansatz, da ich die Verbindungsfreigabe nutze. Dabei wird wohl automatisch die Firewall konfiguriert und wenn ich iptables flushe geht nix mehr... nichtmal die Inetverbindung am Router....

Imp_Vmax_

Professional

Posts: 766

Occupation: GER

  • Send private message

6

Thursday, July 8th 2004, 8:15pm

ich hab Debian 3.0 r0 woody

wenn die IPTables flusht und dann nix mehr geht liegts daran dass wohl deine Dafault Policies deiner Iptables auf deny stehen.
in meinem Skript steht folgendes drin:

#default-policies festlegen
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT

#Löschen aller alten evtl. noch vorhandenen Regeln
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -X

# loopback muß lokal offen sein
$IPTABLES -A OUTPUT -o lo -j ACCEPT
$IPTABLES -A INPUT -i lo -j ACCEPT

$IPTABLES -A INPUT -p icmp -j ACCEPT

# masquerading einschalten
$IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# pakete die zu bestehenden verbindungen gehören (established)
# und solche die dazugehören (related) dürfen rein
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT


#Portforwarding

#Age
$IPTABLES -A PREROUTING -t nat -i ppp0 -p tcp --dport 2300:2400 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p udp --dport 2300:2400 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p udp --dport 47624 -j DNAT --to 192.168.42.3
$IPTABLES -A PREROUTING -t nat -i ppp0 -p tcp --dport 47624 -j DNAT --to 192.168.42.3

# alles verwerfen, was auf keine bisherige regel gepaßt hat
$IPTABLES -A INPUT -i $DEV_EXT -j REJECT

Das ist nur n Auszug der dir reichen sollte. wenn das startest solltest normal Inet benutzen können und Age zocken können

OLV_Ariovist

Intermediate

  • "OLV_Ariovist" started this thread

Posts: 371

Location: Essen

Occupation: GER

  • Send private message

7

Thursday, July 8th 2004, 10:40pm

Danke vmax, es läuft soweit, aber 2 Fragen hab ich noch:

Wie starte ich das ganze Zeugs automatisch beim booten und wie binde ich das "state-Modul ein", da ich den Befehl noch nicht nutzen kann.

Nochmals Danke

edit: habs mir selber beantwortet, lesen bildet ;)

This post has been edited 1 times, last edit by "OLV_Ariovist" (Jul 9th 2004, 11:46am)


OLV_Ariovist

Intermediate

  • "OLV_Ariovist" started this thread

Posts: 371

Location: Essen

Occupation: GER

  • Send private message

8

Friday, July 9th 2004, 3:53pm

Hast du es schon mit default DROP hinbekommen?

Imp_Vmax_

Professional

Posts: 766

Occupation: GER

  • Send private message

9

Friday, July 9th 2004, 4:15pm

sollte auch kein großes Problen sein.

dafür musst halt jeden Traffic explizit durchlassen, was mitunter ziemlich umfangreich werden dürfte, deshalb mach ich default accept und schmeiß in meiner letzten Regel alles was mir net passt weg.