Microsoft PPTP VPN und Susefirewall2
Wie kriegt man die zwei zusammen zum Laufen ohne extra Anwendungen wie pptpproxy? Das war eine Frage die ich lange hatte und endlich habe ich eine Lösung dafür. In einem Forum fand ich einen Eintrag, der zeigte wie man GRE Verbindungen durch die Standardfirewall von openSUSE weiterleitete. Hier ist also die funktionierende Konfiguration für mein openSUSE 10.2 mit Microsoft Small Business Server 2003.
Zuerst muss man eigene Regelen aktivieren in /etc/sysconfig/SuSEfirewall2. Suche dafür
## Type: string
#
# 25.)
# Do you want to load customary rules from a file?
#
# This is really an expert option. NO HELP WILL BE GIVEN FOR THIS!
# READ THE EXAMPLE CUSTOMARY FILE AT /etc/sysconfig/scripts/SuSEfirewall2-custom
#
#FW_CUSTOMRULES="/etc/sysconfig/scripts/
SuSEfirewall2-custom"
FW_CUSTOMRULES=""
Kommentiere #FW_CUSTOMRULES="/etc/sysconfig/scripts/ ein und entferne
SuSEfirewall2-custom"FW_CUSTOMRULES="".
Öffne dann /etc/sysconfig/scripts/SuSEfirewall2-custom und suche
fw_custom_after_antispoofing() {
...
true
}
Füge vor true folgendes hinzu:
vpnserver="192.168.168.1"
inetdevice="dsl0"
iptables -N pptp
iptables -A pptp -p tcp --destination-port 1723 --dst $vpnserver -j ACCEPT
iptables -A pptp -p 47 --dst $vpnserver -j ACCEPT
iptables -I FORWARD -j pptp
iptables -t nat -N pptp
iptables -t nat -A pptp -i $inetdevice -p tcp --dport 1723 -j DNAT --to $vpnserver:1723
iptables -t nat -A pptp -i $inetdevice -p 47 -j DNAT --to $vpnserver
iptables -t nat -A PREROUTING -j pptp
Ändere dann vpnserver und inetdevice passend zu deiner Konfiguration; inetdevice ist normalerweise ppp0.
Starte noch Susefirewall2 mit rcSuSEfirewall2 restart neu und fertig.
This is great stuff, thanks for having the blog and putting details like this on it. Those of us with no writing skills really appreciate it. Believe me.