Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
openvpn hilfe [SOLVED]
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)
View previous topic :: View next topic  
Author Message
ro
Apprentice
Apprentice


Joined: 28 Mar 2003
Posts: 289

PostPosted: Thu Feb 23, 2006 9:07 pm    Post subject: openvpn hilfe [SOLVED] Reply with quote

Hi,

also heut ist echt nicht mein Tag ... in diversen config files so blöd vertippt und stundenlang den Fehler gesucht. Zum folgenden Problem hab ich aber wirklich die schnauze voll. Ich hab hier ein Netz das so aussieht:
Code:

-----------------             -----------------                      ----------------------------                                    --------------------------
ROUTER  I------------I SWITCH I--------------------I WLAN-SWITCH I    ((      ((       ((       (( I  10.0.0.2 tap0    I
-----------------             -----------------                     ----------------------------                                   I   192.168.2.10   I
                               /           I                                                                                        -----------------------------
----------------              /            I
*.*.1.10   I------------+             I
----------------                           I
                                    OpenVPN
                                    192.168.1.3
                                    192.168.2.1
                                     10.0.0.1

Also zur Erläuterung: Ein Kabel-Netzwerk 192.168.1.0/24. Vorher hatte ich WEP im Einsatz, und der WLAN-Switch sowie die 3 WLAN-Clienten waren im gleichen Netz. Das will ich jetzt trennen: ich hab dem WLAN 192.168.2.* gegeben und dem OpenVPN-Server ein e alias (eth0:1) mit 192.168.2.1. Jetzt ist noch keine Verschlüsselung eingebaut, eine Verbindung wie in diversen OpenVPN Howtos von 10.0.0.2 (ein client) nach 10.0.0.1 (Server) funktioniert soweit. Ping, ssh etc vom WLAN auf den Server funktioniert, ich will aber dann mit OpenVPN im Kabelnetzwerk sein... also ganz normal ins Internet gehn alsob ich im 192.168.1.* - Netzwerk wäre. Was muss ich da noch machen?
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.


Last edited by ro on Fri Feb 24, 2006 5:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Deever
Veteran
Veteran


Joined: 06 Jul 2002
Posts: 1354
Location: Zürich / Switzerland

PostPosted: Thu Feb 23, 2006 9:41 pm    Post subject: Reply with quote

Ohne mir im Gewissen zu sein, dein Problem gänzlich verstanden zu haben, würde ich auf einen Mißstand beim Routing wetten. Wärest du so gut, uns die Ausgabe von 'route' auf den Routern und beteiligten Endgeräten darzulegen?

Gruß,
/dev
Back to top
View user's profile Send private message
ro
Apprentice
Apprentice


Joined: 28 Mar 2003
Posts: 289

PostPosted: Thu Feb 23, 2006 11:52 pm    Post subject: Reply with quote

also im prinzip siehts so aus:

Vom Server, der im Netzwerk (192.168.1.) ist und mittels eth0:1 auch im WLAN (192.168.2.) ist sieht "route" so aus:
Quote:

Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 tap0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default kenny 0.0.0.0 UG 0 0 0 eth0


Und vom Clienten, der sich im WLAN befindet und mit openvpn zum vpn-server (also client hat 10.0.0.2 und server 10.0.0.1) sieht route so aus:
Quote:
Ziel Router Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 tap0
192.168.2.0 * 255.255.255.0 U 0 0 0 ra0
loopback * 255.0.0.0 U 0 0 0 lo


Bei iptables ist noch nichts geändert, alles auf ACCEPT. Am Server hab ich /proc/sys/net/ipv4/ip_forward auf 1 gestellt. kenny gibt die Verbindung an alle 192.168.1. - Rechner her. Am Clienten hab ich "route add default gw 10.0.0.1" probiert etc. aber nichts ging, ra0 ist das WLAN device. Irgendwas fehlt da noch, irgendwo hab ich einen grossen Denkfehler. Hoffe ihr könnt mir helfen.
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Fri Feb 24, 2006 8:03 am    Post subject: Reply with quote

Also am Client muss definitiv ein

route add default gw 10.0.0.1

stattfinden. Das ist aber bei deinen Postings nicht der Fall.

Dann noch eine weitere Frage:

Welcher Rechner ist denn nun im Internet? Der Server mit der IP 10.0.0.1 oder dieser Kenny (welcher ist das, welche IP hat der?) Am besten du verwendest den Aufruf "route -n", denn mit den Rechnernamen können wir wenig anfangen.

Falls ein dritter Rechner die Verbindung zum Internet herstellt, muss dieser auch wissen wo sich das 10.0.0.1 Netzwerk befindet:

route add -net 10.0.0.0/24 gw 192.168.1.X (IP des OpenVPN Servers)
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
ro
Apprentice
Apprentice


Joined: 28 Mar 2003
Posts: 289

PostPosted: Fri Feb 24, 2006 4:48 pm    Post subject: Reply with quote

soweit sogut. Das route am Router (kenny mit 192.168.1.1) hab ich nicht bedacht. Jetzt hab ich von den Clienten aus schonmal zugriff aufs interne Netzwerk. Allerdings komme ich nicht ins Internet. Wie gehts dann weiter? Ich erhalte immer ein "no route to host"
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Feb 24, 2006 5:14 pm    Post subject: Reply with quote

Wenn ichs noch richtig durchblicke fehlt dir auf 'kenny' noch eine Route ins 10er Netz über das Gateway 'Server'.

Wenn nicht... bitte je ein ifconfig + route -n von server + kenny + client
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
ro
Apprentice
Apprentice


Joined: 28 Mar 2003
Posts: 289

PostPosted: Fri Feb 24, 2006 5:17 pm    Post subject: Reply with quote

Lösung gefunden. Das Problem lag am Router kenny. Da hab ich seit Jahren Smoothwall drauf laufen und die funktioniert recht gut (never change a running system). Da gibts 3 Netzwerke: RED, ORANGE, GREEN. Und dass man raus kann muss man im GREEN Netzwerk sein. Ich hab jetzt statt 10.0.0.0/24 einfach 192.168.3.0/24 genommen (fürs VPN) und beim Router die Netmask auf 255.255.0.0 fürs Netzwerk GREEN gestellt. Jetzt klappts. Danke für die Hilfe!
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Feb 24, 2006 5:28 pm    Post subject: Reply with quote

so gehts natürlich auch :wink:

Aber du solltest nicht gleich mit Kanonen auf Spatzen schießen, die Netzmaske 255.255.0.0 ist Overkill; 255.255.252.0 hätts auch getan.
Ok bei 192.168.x.y ist das generell wurscht da eh komplett RFC1918 aber Sparen hat noch nie geschadet.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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