Routing/Firewallproblem mit OpenVPN

Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen
Author Message
linuxjosef
DD-WRT Novice


Joined: 16 Jul 2007
Posts: 8

PostPosted: Fri Jan 29, 2010 0:40    Post subject: Routing/Firewallproblem mit OpenVPN Reply with quote
Ich habe dd-wrt auf einer Fonera (FON2200) installiert und würde das gerne wie folgt nutzen:
Mein Haupt-Router <- WLAN -> Fonera <- OpenVPN -> Internet
Wobei dann die Fonera ein 2. Netzwerk aufmachen soll.

Also der Router soll sich per WLAN mit dem Internet verbinden, eine VPN Verbindung aufmachen und dann ein 2. WLAN, wobei aller Traffic über das VPN läuft.

Bis jetzt kann sich der Router per WLAN mit dem Internet verbinden, und Routet auch den Traffic.
Routingtabelle sieht so aus:
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 ath0
172.18.0.0      *               255.255.255.0   U     0      0        0 br0
169.254.0.0     *               255.255.0.0     U     0      0        0 br0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         router.main     0.0.0.0         UG    0      0        0 ath0


Wenn ich mich mit der Fonera verbinde, bekomme ich eine IP aus dem 172.18.0 Netz und komme ins Internet.

Ich möchte mich nun per OpenVPN zu hotsplots verbinden (http://www.hotsplots.de/support/files-links/openvpn.html)
Es soll dann jeder Traffic zum Internet über Hotsplots laufen.

Ich habe zuerst einfach alle Daten für das VPN im Webinterface eingetragen.
Verbindung scheint zu funktionieren, aber ich kann weder den Tunnelendpunkt noch irgend was anderes pingen Sad
Ich hab dann mal folgendes Startupscript hinzugefügt:
Code:
echo "
while [ ! -f /tmp/openvpncl/route-up.sh ]; do sleep 1; done;
cd /tmp/openvpncl
sleep 5
killall openvpn
sleep 5

echo \"iptables -I FORWARD -i br0 -o tun0 -j ACCEPT; iptables -I FORWARD -i tun0 -o br0 -j ACCEPT; iptables -I INPUT -i tun0 -j ACCEPT\" >route-up.sh

echo \"iptables -D FORWARD -i br0 -o tun0 -j ACCEPT; iptables -D FORWARD -i tun0 -o br0 -j ACCEPT; iptables -D INPUT -i tun0 -j ACCEPT\" >route-down.sh
chmod a+x *.sh

/usr/sbin/openvpn --daemon --config /tmp/openvpncl/openvpn.conf --route-up /tmp/openvpncl/route-up.sh --down /tmp/openvpncl/route-down.sh
" >/tmp/vpnstartup.sh
chmod a+x /tmp/vpn*.sh

/tmp/vpnstartup.sh &

Bringt aber auch nichts.
Wenn ich auf der Konsole OpenVPN starte, kommt kein Fehler.
Code:
Fri Jan 29 01:41:13 2010 OpenVPN 2.1_rc20 mips-unknown-linux-gnu [SSL] [LZO1] [EPOLL] built on Oct 10 2009
Fri Jan 29 01:41:13 2010 WARNING: file '/tmp/openvpncl/client.key' is group or others accessible
Fri Jan 29 01:41:13 2010 RESOLVE: NOTE: vpn.hotsplots.net resolves to 7 addresses, choosing one by random
Fri Jan 29 01:41:13 2010 UDPv4 link local: [undef]
Fri Jan 29 01:41:13 2010 UDPv4 link remote: 217.11.52.106:1194
Fri Jan 29 01:41:14 2010 [VPN1] Peer Connection Initiated with 217.11.52.106:1194
Fri Jan 29 01:41:18 2010 TUN/TAP device tun0 opened
Fri Jan 29 01:41:18 2010 /sbin/ifconfig tun0 10.44.5.114 pointopoint 10.44.5.113 mtu 1500
Fri Jan 29 01:41:18 2010 Initialization Sequence Completed


Ich kann aber nichts Pingen. Weder den Endpunkt (in dem Fall 10.44.5.113) noch irgend eine andere IP im Internet.

Es muss also am Routing oder an der Firewall liegen.
Routingtabelle sieht gut aus:
Quote:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.44.5.113 * 255.255.255.255 UH 0 0 0 tun0
217.11.52.106 router.main 255.255.255.255 UGH 0 0 0 ath0
10.44.0.1 10.44.5.113 255.255.255.255 UGH 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 ath0
172.18.0.0 * 255.255.255.0 U 0 0 0 br0
169.254.0.0 * 255.255.0.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.44.5.113 128.0.0.0 UG 0 0 0 tun0
128.0.0.0 10.44.5.113 128.0.0.0 UG 0 0 0 tun0
default router.main 0.0.0.0 UG 0 0 0 ath0


Ich komm hier nicht mehr weiter :'(
Kann mir jemand helfen?
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Fri Jan 29, 2010 20:24    Post subject: Reply with quote
kannst du mir mal sagen warum du die rules in routeup schreibst und net direkt in di eiptables chains?
das is wesentlich einfacher und uebersichtlicher

_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
linuxjosef
DD-WRT Novice


Joined: 16 Jul 2007
Posts: 8

PostPosted: Sat Jan 30, 2010 0:29    Post subject: Reply with quote
Weil ich das Script irgendwo kopiert habe.

Mein Problem ist aber, dass es nicht läuft.
Um Schönheitskorrekturen kann ich mich später kümmern!
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Sat Jan 30, 2010 12:27    Post subject: Reply with quote
mit sicherheit funktioniert da einfach was net.
und ingendwas zu kopieren ohnes zu verstehen......

_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
linuxjosef
DD-WRT Novice


Joined: 16 Jul 2007
Posts: 8

PostPosted: Sat Jan 30, 2010 15:31    Post subject: Reply with quote
Sash wrote:
mit sicherheit funktioniert da einfach was net.
Wow! Das ist mal eine qualifizierte Aussage! Rolling Eyes
Wenn du Held jetzt auch noch sagen könntest was, dann würde das sogar ins Topic passen!

Ausserdem sagt keiner, dass ich es nicht verstehe.
Es hat auch Vorteile das in die route-up und -down Scripte zu schreiben, weil das die tables nicht Vollmüllt, wenn das VPN nicht läuft!
Interessanterweise hat das aber alles 0,0 mit meiner Frage zu tun.
Das VPN funktioniert nämlich auch nicht plötzlich auf magische Weise, wenn ich die iptables -I kommandos woanders aufrufe!
linuxjosef
DD-WRT Novice


Joined: 16 Jul 2007
Posts: 8

PostPosted: Tue Feb 02, 2010 15:27    Post subject: Reply with quote
Falls noch jemand das Problem hat: Liegt definitiv an irgend einer Eigenheit von dd-wrt.
Mit OpenWRT 8.09 RC1 läuft alles ohne Probleme mit den selben Einstellungen.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen All times are GMT

Navigation

 
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
You can attach files in this forum
You can download files in this forum