LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-09-2013, 05:25 AM   #1
it-secret
LQ Newbie
 
Registered: Jun 2012
Posts: 14

Rep: Reputation: Disabled
problem with openvpn server


Hello evreyone
i had install OpenVpn on VPS (CentOs) , VPS install on OpenVZ
i had solve the issue to sent suppourts to enable tun0
after the when i want connect from my client i had problem
from my server
output :
Code:
[root@vpn ~]# tail /var/log/messages
Oct  9 14:07:55 vpn openvpn[7363]: UID set to nobody
Oct  9 14:07:55 vpn openvpn[7363]: UDPv4 link local (bound): [undef]
Oct  9 14:07:55 vpn openvpn[7363]: UDPv4 link remote: [undef]
Oct  9 14:07:55 vpn openvpn[7363]: MULTI: multi_init called, r=256 v=256
Oct  9 14:07:55 vpn openvpn[7363]: IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Oct  9 14:07:55 vpn openvpn[7363]: ifconfig_pool_read(), in='user1,10.8.0.4', TODO: IPv6
Oct  9 14:07:55 vpn openvpn[7363]: succeeded -> ifconfig_pool_set()
Oct  9 14:07:55 vpn openvpn[7363]: IFCONFIG POOL LIST
Oct  9 14:07:55 vpn openvpn[7363]: user1,10.8.0.4
Oct  9 14:07:55 vpn openvpn[7363]: Initialization Sequence Completed
openvpn started

output
Code:
[root@vpn openvpn]# openvpn server.conf 
Wed Oct  9 14:11:18 2013 OpenVPN 2.3.2 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Jun  3 2013
Wed Oct  9 14:11:18 2013 Diffie-Hellman initialized with 1024 bit key
Wed Oct  9 14:11:18 2013 Socket Buffers: R=[245760->131072] S=[245760->131072]
Wed Oct  9 14:11:18 2013 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
Wed Oct  9 14:11:18 2013 Exiting due to fatal error
then cannot connect from my client ,
but when disable openvpn , it's works and client connect but can't browsing !

output after disable :

Code:
[root@vpn openvpn]# openvpn server.conf 
Wed Oct  9 14:15:26 2013 OpenVPN 2.3.2 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Jun  3 2013
Wed Oct  9 14:15:26 2013 Diffie-Hellman initialized with 1024 bit key
Wed Oct  9 14:15:26 2013 Socket Buffers: R=[245760->131072] S=[245760->131072]
Wed Oct  9 14:15:26 2013 ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:00:00
Wed Oct  9 14:15:26 2013 TUN/TAP device tun0 opened
Wed Oct  9 14:15:26 2013 TUN/TAP TX queue length set to 100
Wed Oct  9 14:15:26 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Oct  9 14:15:26 2013 /sbin/ip link set dev tun0 up mtu 1500
Wed Oct  9 14:15:26 2013 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Wed Oct  9 14:15:26 2013 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Wed Oct  9 14:15:26 2013 GID set to nobody
Wed Oct  9 14:15:26 2013 UID set to nobody
Wed Oct  9 14:15:26 2013 UDPv4 link local (bound): [undef]
Wed Oct  9 14:15:26 2013 UDPv4 link remote: [undef]
Wed Oct  9 14:15:26 2013 MULTI: multi_init called, r=256 v=256
Wed Oct  9 14:15:26 2013 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Wed Oct  9 14:15:26 2013 ifconfig_pool_read(), in='user1,10.8.0.4', TODO: IPv6
Wed Oct  9 14:15:26 2013 succeeded -> ifconfig_pool_set()
Wed Oct  9 14:15:26 2013 IFCONFIG POOL LIST
Wed Oct  9 14:15:26 2013 user1,10.8.0.4
Wed Oct  9 14:15:26 2013 Initialization Sequence Completed
output routes
[CODE]
[root@vpn openvpn]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
link-local * 255.255.0.0 U 1002 0 0 venet0
default * 0.0.0.0 U 0 0 0 venet0
[CODE]

and client works , i don't know what is the problem !
should stop openvpn or enable i don't use or set iptables rules
or maybe routing !
./Regard

Last edited by it-secret; 10-09-2013 at 05:42 AM.
 
Old 10-09-2013, 06:40 AM   #2
tripialos
Member
 
Registered: Apr 2012
Posts: 169

Rep: Reputation: Disabled
Quote:
but when disable openvpn , it's works and client connect but can't browsing
What do you man with that?
You mean that when you disable the openvpn SERVICE from the server the client connects?

If yes, then this is not normal. If you think about it, how is the client possible to connect to the vpnserver if the server is not running any vpn service?

If the above is correct , in combination with the below error:

Quote:
Wed Oct 9 14:11:18 2013 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
It could be possible that another instance of openvpn could be running. I am not an expert nor i am sure if this is possible but it could be the case.

Could you start openvpn and bring the service back to state where the client cannot connect. Then post the output of the following two commands:

Quote:
ps -ef|grep openvpn
and

Quote:
netstat -naup
 
Old 10-13-2013, 11:43 AM   #3
it-secret
LQ Newbie
 
Registered: Jun 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
sorry 4 late i was busy ,

output : ps -ef|grep openvpn

Code:
nobody   16457     1  0 20:38 ?        00:00:00 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/server.pid --config server.conf --cd /etc/openvpn --script-security 2
root     16461 16188  0 20:38 pts/0    00:00:00 grep openvpn

output : netstat -naup

Code:
ctive Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
udp        0      0 0.0.0.0:1194                0.0.0.0:*                               16457/openvpn
i think the problem with route , my client connect to server ! but the server can't let me access to outside ! maybe should i use iptables !

./Regard
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Directing OpenVPN client's traffic through the OpenVPN server mohtasham1983 Linux - Networking 1 01-17-2012 06:44 PM
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
How does OpenVPN Linux server issues IP and netmask to OpenVPN clients on Windows XP pssompura Linux - Networking 0 12-24-2009 02:42 AM
Help!. Problem connecting to an Openvpn through proxy server. microsoftguy Linux - Software 1 08-03-2006 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration