After a good couple hours I finally managed to set up a bridged openvpn server and client on hardy server. I can connect from inside and outside my network but I can't ping anyone on the network. From what I have read in various tutorials it seems that it is an issue with firewall or iptables. As far as I know there is no firewall and webmin says there are no iptables set up.
Here are the configs
Server:
Client:Code:;local 192.168.1.5 daemon port 1194 proto tcp-server dev tap0 ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/server.crt key /etc/openvpn/easy-rsa/keys/server.key dh /etc/openvpn/dh1024.pem server-bridge 192.168.100.1 255.255.255.0 192.168.100.2 192.168.100.100 ifconfig-pool-persist openvpn.dhcp ;ifconfig 192.168.100.1 255.255.255.0 keepalive 10 120 comp-lzo user nobody group nogroup persist-key persist-tun status /var/log/openvpn/openvpn-status.log log-append /var/log/openvpn/openvpn.log verb 4 mute 20 ;push "route 192.168.100.0 255.255.255.0" ;push "route 192.168.173.0 255.255.255.0" ;push "redirect-gateway def1" ;client-config-dir ccd ;route 192.168.40.128 255.255.255.248 client-to-client max-clients 10 # plugin /usr/lib/openvpn/openvpn-auth-pam.so common-auth # client-cert-not-required # username-as-common-name
ifconfigCode:############################################## # 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 ;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 OpenVPN # Are we connecting to a TCP or # UDP server? Use the same setting as # on the server. ;proto tcp ;proto udp proto tcp-client # The hostname/IP and port of the server. # You can have multiple remote entries # to load balance between the servers. remote server 1194 ;remote my-server-2 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 # If you are connecting through an # HTTP proxy to reach the actual OpenVPN # server, put the proxy server/IP and # port number here. See the man page # if your proxy server requires # authentication. ;http-proxy-retry # retry on connection failures ;http-proxy [proxy server] [proxy port #] # Wireless networks often produce a lot # of duplicate packets. Set this flag # to silence duplicate packet warnings. ;mute-replay-warnings # SSL/TLS parms. # See the server config file for more # description. It's best to use # a separate .crt/.key file pair # for each client. A single ca # file can be used for all clients. ca ca.crt cert planata.crt key planata.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
Please let me know if more info is needed. Thank you for any help!Code:br0 Link encap:Ethernet HWaddr 00:10:dc:6a:df:77 inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::210:dcff:fe6a:df77/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:59110 errors:0 dropped:0 overruns:0 frame:0 TX packets:109417 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4828350 (4.6 MB) TX bytes:9575432 (9.1 MB) eth0 Link encap:Ethernet HWaddr 00:10:dc:6a:df:77 inet6 addr: fe80::210:dcff:fe6a:df77/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:58529 errors:0 dropped:0 overruns:0 frame:0 TX packets:109946 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:5674762 (5.4 MB) TX bytes:9669542 (9.2 MB) Interrupt:16 Base address:0xe800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:42179 errors:0 dropped:0 overruns:0 frame:0 TX packets:42179 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2340151 (2.2 MB) TX bytes:2340151 (2.2 MB) tap0 Link encap:Ethernet HWaddr 00:ff:0d:ae:7e:d2 inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0 inet6 addr: fe80::2ff:dff:feae:7ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:595 errors:0 dropped:0 overruns:0 frame:0 TX packets:7298 errors:0 dropped:360 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:71374 (69.7 KB) TX bytes:1396301 (1.3 MB)



Adv Reply



Bookmarks