DaVeD Geschrieben 16. April 2006 Teilen Geschrieben 16. April 2006 Es geht darum zwei Private Netze über OpenVPN zu verbinden, das ganze soll gebridged laufen so dass die Windows Freigaben funktionieren, und auch alle broadcasts beim Client ankommen. Das erste (SERVER) Netz arbeited mit: Netz 192.168.0.0 VPN Server 192.168.0.69 Router 192.168.0.1 Das zweite (Clientnetz) mit: Netz 192.168.2.0 VPN Client 192.168.2.2 Router 192.168.2.100 In beiden Routern ist der Port 1194 für eingang und ausgang frei. Also hab ich hier folgendes server.ovpn ################################################# # Sample OpenVPN 2.0 config file for # # multi-client server. # # # # This file is for the server side # # of a many-clients <-> one-server # # OpenVPN configuration. # ################################################# # Which local IP address should OpenVPN # listen on? (optional) ;local a.b.c.d # Which TCP/UDP port should OpenVPN listen on? # If you want to run multiple OpenVPN instances # on the same machine, use a different port # number for each one. port 1194 # TCP or UDP server? ;proto tcp proto udp # "dev tun" will create a routed IP tunnel, # "dev tap" will create an ethernet tunnel. dev tap #Weil das Netz gebrückt werden soll nicht grouted ;dev tun # Windows needs the TAP-Win32 adapter name # from the Network Connections panel if you # have more than one. Is klar. dev-node VPN # keys ca "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt" #Auf Win Dateisystem umgefrickelt cert "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.crt" #Auf Win Dateisystem umgefrickelt key "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.key" #Auf Win Dateisystem umgefrickelt # Diffie hellman parameters. # Pfad auf Win Dateisystem umgefrickelt dh "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem" # Wir bridgen ;server 10.8.0.0 255.255.255.0 # Client IPs hier verteilen ifconfig-pool-persist ipp.txt # Bridgen statt routen wegen Freigaben usw.... server-bridge 192.168.0.69 255.255.255.0 192.168.0.230 192.168.0.250 # Certain Windows-specific network settings # can be pushed to clients, such as DNS # or WINS server addresses. CAVEAT: # http://openvpn.net/faq.html#dhcpcaveats ;push "dhcp-option DNS 10.8.0.1" ;push "dhcp-option WINS 10.8.0.1" # The keepalive directive causes ping-like # messages to be sent back and forth over # the link so that each side knows when # the other side has gone down. # Ping every 10 seconds, assume that remote # peer is down if no ping received during # a 120 second time period. keepalive 10 120 # For extra security beyond that provided # by SSL/TLS, create an "HMAC firewall" # to help block DoS attacks and UDP port flooding. # # Generate with: # openvpn --genkey --secret ta.key # # The server and each client must have # a copy of this key. # The second parameter should be '0' # on the server and '1' on the clients. ;tls-auth ta.key 0 # This file is secret # Select a cryptographic cipher. # This config item must be copied to # the client config file as well. ;cipher BF-CBC # Blowfish (default) ;cipher AES-128-CBC # AES ;cipher DES-EDE3-CBC # Triple-DES # Enable compression on the VPN link. # If you enable it here, you must also # enable it in the client config file. comp-lzo # The maximum number of concurrently connected # clients we want to allow. ;max-clients 20 # It's a good idea to reduce the OpenVPN # daemon's privileges after initialization. # # You can uncomment this out on # non-Windows systems. ;user nobody ;group nobody # The persist options will try to avoid # accessing certain resources on restart # that may no longer be accessible because # of the privilege downgrade. persist-key persist-tun # Output a short status file showing # current connections, truncated # and rewritten every minute. status "C:\\Program Files\\OpenVPN\\sample-config\\openvpn-status.log" # Set the appropriate level of log # file verbosity. # # 0 is silent, except for fatal errors # 4 is reasonable for general usage # 5 and 6 can help to debug connection problems # 9 is extremely verbose verb 9 # Silence repeating messages. At most 20 # sequential messages of the same message # category will be output to the log. ;mute 20 Dies ist das .ovpn File auf der Client Seite ############################################## # Sample client-side OpenVPN 2.0 config file # # for connecting to multi-client server. # # # # This configuration can be used by multiple # # clients, however each client should have # # its own cert and key files. # # # # On Windows, you might want to rename this # # file so it has a .ovpn extension # ############################################## # Specify that we are a client and that we # will be pulling certain config file directives # from the server. client # Use the same setting as you are using on # the server. # On most systems, the VPN will not function # unless you partially or fully disable # the firewall for the TUN/TAP interface. dev tap #Weil das Netz gebrückt werden soll nicht grouted ;dev tun # Windows needs the TAP-Win32 adapter name # from the Network Connections panel # if you have more than one. On XP SP2, # you may need to disable the firewall # for the TAP adapter. dev-node VPN # Are we connecting to a TCP or # UDP server? Use the same setting as # on the server. ;proto tcp proto udp # The hostname/IP and port of the server. # You can have multiple remote entries # to load balance between the servers. remote HIER STEHT DIE INET IP DES SERVERS 1194 ;remote daved84.dyndns.org 1194 # Choose a random host from the remote # list for load-balancing. Otherwise # try hosts in the order specified. ;remote-random # Keep trying indefinitely to resolve the # host name of the OpenVPN server. Very useful # on machines which are not permanently connected # to the internet such as laptops. resolv-retry infinite # Most clients don't need to bind to # a specific local port number. nobind # Downgrade privileges after initialization (non-Windows only) ;user nobody ;group nobody # Try to preserve some state across restarts. persist-key persist-tun # Wireless networks often produce a lot # of duplicate packets. Set this flag # to silence duplicate packet warnings. ;mute-replay-warnings # keys ca "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt" cert "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.crt" key "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\client1.key" # Verify server certificate by checking # that the certicate has the nsCertType # field set to "server". This is an # important precaution to protect against # a potential attack discussed here: # http://openvpn.net/howto.html#mitm # # To use this feature, you will need to generate # your server certificates with the nsCertType # field set to "server". The build-key-server # script in the easy-rsa folder will do this. ;ns-cert-type server # If a tls-auth key is used on the server # then every client must also have the key. ;tls-auth ta.key 1 # Select a cryptographic cipher. # If the cipher option is used on the server # then you must also specify it here. ;cipher x # Enable compression on the VPN link. # Don't enable this unless it is also # enabled in the server config file. comp-lzo # Set log file verbosity. verb 3 # Silence repeating messages ;mute 20 Jetzt hab ich die den Ethernetcontroller des Servers mit dem VPN-Tap gebridged per rechte maustaste überbrücken. Jetzt müsste doch normalerweise die Verbindung so von statten gehen das der Client der in seinem Privaten Netz die 192.168.2.2 hat vom Server eine Adresse im Servernetz zugewiesen bekommt (230-250) also wahrscheinlich die 192.168.0.231. Warum passiert da nix? Der Client bekommt als letzt meldung immer nur: Sun Apr 16 16:36:51 2006 UDPv4 link local: [undef] Sun Apr 16 16:36:51 2006 UDPv4 link remote: 84.166.216.181:1194 Ich frickel da jetzt schon Tage ohne unterlass dran rum, Fakt ist das es alles in meiner Doku funktionieren soll allerdings tuts ds nicht und bricht mir nochs Genick.... Plz help Zitieren Link zu diesem Kommentar Auf anderen Seiten teilen Mehr Optionen zum Teilen...
..::rEnE::.. Geschrieben 19. April 2006 Teilen Geschrieben 19. April 2006 Warum soll das nicht mit Routing funktionieren ??? Wenn das Routing richtig konfigueriert ist, dann laufen da auch alle Windows-Freigaben ganz normal... gib mal in die Konsole "ROUTE PRINT" ein, dann erhälst du die Routing-Tabelle... Du musst dann nur eventuell, um Zugriff in ein anderes IP-Netz zu bekommen, die passenden Routen anlegen. Bei OpenVPN geht dies direkt im .ovpn-File... Zitieren Link zu diesem Kommentar Auf anderen Seiten teilen Mehr Optionen zum Teilen...
Empfohlene Beiträge
Dein Kommentar
Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.