Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been through 10+ tutorials on setting up a OpenVPN, and each tutorial gives a different problem...

Does anyone know of a decent and helpful website/tutorial which I could go to to get it set up? I have been battling through it for almost 2 months now.

Yes, I have also bugged forums.openvpn, but I think I have "reached my post limit" with them.

I have to configure it remotely via ssh.

UPDATE:

okay, I have been asked to be more clear on the topic

I followed this tutorial (as a example) -

http://www.servermom.com/how-to-build-openvpn-server-on-centos-6-x/732/

I had no issues setting up, etc. except when I boot into windows and run the OpenVPN GUI Client, it connects and gives this error:

WARNING: Bad encapsulated packet length from peer (21331), which must be > 0 and <= 1576 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attemping restart...]

Here is my server config:

port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Co$
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment$
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3

and my client config:

client
dev tun
proto udp
remote [server ip] 1194 # - Your server IP and OpenVPN Port
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca ca.crt
auth-user-pass
comp-lzo
reneg-sec 0
verb 3

OpenVPN Client Log:

Thu Oct 31 11:51:29 2013 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct  1 2006
Thu Oct 31 11:51:44 2013 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Thu Oct 31 11:51:44 2013 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Oct 31 11:51:44 2013 LZO compression initialized
Thu Oct 31 11:51:44 2013 Control Channel MTU parms [ L:1576 D:140 EF:40 EB:0 ET:0 EL:0 ]
Thu Oct 31 11:51:44 2013 Data Channel MTU parms [ L:1576 D:1450 EF:44 EB:135 ET:32 EL:0 AF:3/1 ]
Thu Oct 31 11:51:44 2013 Local Options hash (VER=V4): '2547efd2'
Thu Oct 31 11:51:44 2013 Expected Remote Options hash (VER=V4): '77cf0943'
Thu Oct 31 11:51:44 2013 Attempting to establish TCP connection with x.x.x.x:1194
Thu Oct 31 11:51:44 2013 TCP connection established with x.x.x.x:1194
Thu Oct 31 11:51:44 2013 TCPv4_CLIENT link local: [undef]
Thu Oct 31 11:51:44 2013 TCPv4_CLIENT link remote: x.x.x.x:1194 

// after this it just hangs, nothing happens

So I dont know what I am doing wrong but I am getting a bit impatient and on each forum I post this, I get stupid/unrelated/unhelpful answers...

share|improve this question
    
What does OpenVPN in common with SSH? They are to different things. What do you want to achieve? –  Jiri Xichtkniha Oct 31 '13 at 14:00
    
i just want a openvpn server, but I must configure it remotely –  user2699451 Oct 31 '13 at 14:03
    
Do not follow any (stupid) unofficial HOWTO and follow official documentation. All this howto on internet are usually shit. I'm not OpenVPN expert (and I even don't like SSL technologies) but why is it using TCP instead of UDP (log output)? –  Jiri Xichtkniha Oct 31 '13 at 14:29
    
Dont use the mtu options unless you are certain you need them. Why are you using 2.0.9? That is pretty old. –  Zoredache Oct 31 '13 at 15:27
add comment

1 Answer

OpenVPN doc: http://openvpn.net/index.php/open-source/documentation.html

If you have specific issue, then say it. Being blurry is not any help.

share|improve this answer
    
By "blurry", do mean "vague"? –  squillman Oct 31 '13 at 14:13
    
Yes, or unclear :) –  Jiri Xichtkniha Oct 31 '13 at 14:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.