Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iptables Portforwarding -> Win VPN Server
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
tzzaetaynzz
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 221

PostPosted: Tue Aug 22, 2006 8:43 pm    Post subject: iptables Portforwarding -> Win VPN Server Reply with quote

Hallo an alle,

ich habe folgende Konfiguration.
Ein Router (LINUX) mit iptables, der funktioniert.
Ein Server (M$ WIN 2003 Server Professional) der im LAN steht.

Wie ich von Win2Win eine VPN Verbindung initiere weiß ich.
Aber ich weiß nicht wie ich externe VPN Anfragen durch den Router an den interne Server weiterleite.

Die iptables Regeln müßten GRE Port47 1723 TCP weiterleiten auf den Server.
Nur wie?

Hier meine Idee, ungetestet
Code:

iptables -A FORWARD -m state --state NEW -i eth0 -p tcp --dport 47 -j ACCEPT
iptables -A FORWARD -m state --state NEW -i eth0 -p upd --dport 47 -j ACCEPT
iptables -A FORWARD -m state --state NEW -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A FORWARD -m state --state NEW -i eth0 -p upd --dport 1723 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp -d eth0 --dport 3389 -j DNAT --to 192.168.2.100:1723
iptables -A PREROUTING -t nat -p tcp -d eth0 --dport 3389 -j DNAT --to 192.168.2.100:43


Nur wo kommt das GRE vor? Das ist doch weder tcp noch udp ... :think:
_________________
gruss //tzzaettaynzz

---

„Have you tried turning it off and on again?“
Back to top
View user's profile Send private message
andix
Apprentice
Apprentice


Joined: 10 Jul 2004
Posts: 263
Location: Eisenstadt, Austria

PostPosted: Tue Aug 22, 2006 9:25 pm    Post subject: Reply with quote

Ich verstehe nicht ganz was Du meinst, aber ich glaube Du vermischt TCP, UDP, GRE, IP und Ports ein bisschen.

Also TCP und UDP sind Protokolle die auf IP aufbauen. TCP und UDP haben IP-Protokollnummern (6 und 17). TCP und UDP haben aber auch Portnummern (in Deinem Fall benutzt Du 1723).

GRE ist auch ein Protokoll das auf IP aufbaut und hat die Protokollnummer 47 (nicht Portnummer!).

Bisschen Literatur dazu:
http://de.wikipedia.org/wiki/Protokoll_%28IP%29
http://de.wikipedia.org/wiki/GRE

Wie Du das jetzt mit iptables behandelt weiß ich leider nicht, aber ich denke es sollte irgendwie so gehen:
Code:
iptables -A PREROUTING -t nat -p gre -d eth0 -j DNAT --to 192.168.2.100
Ich denke genauso wie bei TCP Ich habe einfach die Portnummern weggelassen (bei GRE gibt es das nicht).
Back to top
View user's profile Send private message
tzzaetaynzz
Apprentice
Apprentice


Joined: 29 Sep 2003
Posts: 221

PostPosted: Tue Aug 22, 2006 9:30 pm    Post subject: Reply with quote

danke andix für deine schnelle antwort.
damit hast du gerade wieder eine wissensluecke gestopft.
protokollnummern kannt ich bis eben nicht. dachte alles ist udp und tcp. :?

die links werde ich lesen.
die regel probiere ich aus.
_________________
gruss //tzzaettaynzz

---

„Have you tried turning it off and on again?“
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum