LinuxQuestions.org
Help answer threads with 0 replies.
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 04-11-2012, 01:49 PM   #1
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Rep: Reputation: 15
Arrow openvpn starts, internet stops


it works in pclinuxos on another machine and it works on this machine in windows but when i start it here in linux mint i loose my internet , although it doesnt give any errors

i asked around in irc and someone told me to add this line to my config file>
up /etc/openvpn/update-resolv-conf

i had to add extra arguments so it would accept that line , no errors but no internet, so i left it as it was

this is the log to the default command>

http://pastebin.com/bJhUnEGU

thanx

(i tested it with a bodhi livecd too with almost the same result except that i noticed that google partially worked, very partially)

Last edited by rastiazul; 04-11-2012 at 01:51 PM.
 
Old 04-11-2012, 03:25 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Isn't the point of a VPN to secure the connection?
 
Old 04-11-2012, 07:31 PM   #3
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
something like that, so?
 
Old 04-12-2012, 02:36 AM   #4
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
when you bring the VPN up can you ping the other end of it?
the command will likely be like 'ping -i tap0 178.73.206.129' (ping the remote end of the tunnel out the tunnel interface.
If that works, then most likely it is a routing issue. Otherwise your VPN is not up.
 
Old 04-12-2012, 09:16 AM   #5
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
rastiazul@rastiazul ~ $ ping -i tap0 178.73.206.129
ping: bad timing interval.

rastiazul@rastiazul ~ $ ping 178.73.206.129
PING 178.73.206.129 (178.73.206.129) 56(84) bytes of data.
64 bytes from 178.73.206.129: icmp_seq=1 ttl=62 time=210 ms
64 bytes from 178.73.206.129: icmp_seq=2 ttl=62 time=211 ms
64 bytes from 178.73.206.129: icmp_seq=3 ttl=62 time=213 ms
^C
 
Old 04-12-2012, 10:19 AM   #6
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
Do the ping test after you have enabled the VPN. If you have enabled it and the ping succeeds without the -i tap0 option then you have internet access from your box with the VPN up, just not through the VPN. Unless the interface name is not correct, check with 'ip addr' or ifconfig. Is tap0 the interface with the .223 address?

Code:
...
Mon Apr  9 20:46:15 2012 /sbin/ifconfig tap0 178.73.206.223 netmask 255.255.255.128 mtu 1500 broadcast 178.73.206.255
Mon Apr  9 20:46:15 2012 /sbin/route add -net 46.246.117.144 netmask 255.255.255.255 gw 192.168.10.1
Mon Apr  9 20:46:15 2012 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 178.73.206.129
Mon Apr  9 20:46:15 2012 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 178.73.206.129
Mon Apr  9 20:46:15 2012 Initialization Sequence Completed
As far as I can tell, you have the .223 address locally and the .129 at the remote end of the tunnel.
The routes that are being set up above as part of the VPN make the remote end of the tunnel the default gateway. So if you VPN is not up you will not have internet access.
 
Old 04-12-2012, 10:48 AM   #7
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
I partially understand you, anyway if config doesnt show any .223 address, this is the tap0:

tap0 Link encap:Ethernet direcciónHW 4a:5f:d8:b1:6f:33
Direc. inet:188.126.74.171 Difus.:188.126.74.255 Másc:255.255.255.128
Dirección inet6: fe80::485f:d8ff:feb1:6f33/64 Alcance:Enlace
ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:1500 Métrica:1
Paquetes RX:24 errores:0 perdidos:0 overruns:0 frame:0
Paquetes TX:21 errores:0 perdidos:0 overruns:0 carrier:0
colisiones:0 long.colaTX:100
Bytes RX:3150 (3.1 KB) TX bytes:4243 (4.2 KB)

and all the output if you need>
http://pastebin.com/TysXWSPT
 
Old 04-13-2012, 05:54 AM   #8
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
I thought tap0 is your vpn tunnel interface when it actually is just another ethernet interface.

Can you post the contents of /etc/openvpn/vpnname.conf? Obviously replace vpnname with whatever you have and mask any sensitive information.
 
Old 04-13-2012, 06:41 AM   #9
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
there is no tap0 when the vpn is off

/etc/openvpn/update-resolv-conf:
http://pastebin.com/SyvCyAM4 (i dont know which info is sensitive....)

did you meant that file of the vpn conf file provided by the vpn company?
 
Old 04-13-2012, 07:36 AM   #10
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
Quote:
Originally Posted by rastiazul View Post
did you meant that file of the vpn conf file provided by the vpn company?
Yes.

If this is a commercial product, do they not support it? If your linux distro is not supported by them, then it is likely the setup scripts will need to be modified to get this to work, or it might not be possible at all.
 
Old 04-13-2012, 03:27 PM   #11
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
in their guide they have instructions for ubuntu and debian so there shouldnt be problems

http://pastebin.com/B1ME6KUt
 
Old 04-13-2012, 11:41 PM   #12
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Hi rastiazul,

I think this is your "problem":
Quote:
Mon Apr 9 20:46:15 2012 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 178.73.206.129"
When you connect to the server, openvpn pushes back the default gateway to the client machine. (route add net)

You can change this behaviour here: /etc/openvpn/server.conf
Quote:
push "redirect-gateway def1 bypass-dhcp"
Just put ; (rem) to the front of that line and only the 10.8.0.0(default openvnp server) network will be routed to the server.
The rest will be routed to the local gateway.

Like that:
Quote:
;push "redirect-gateway def1 bypass-dhcp"
Or if you want to add private networks you could do that with this command:
Quote:
push "route 192.168.0.0 255.255.255.0"
Then it will add this private network to the routing table on the client machine.

Take a look for more explanation here:
http://openvpn.net/index.php/open-so....html#redirect

I hope it helps.

Laz
 
Old 04-14-2012, 08:44 AM   #13
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
hi laz.

the only file in /etc/openvpn/ is update-resolv-conf and it doesnt have the line you mentioned (i posted the contents of that file here previously)

and the vpn conf file doesnt contain that line eather, i posted it in my previous post

Last edited by rastiazul; 04-14-2012 at 08:56 AM.
 
Old 04-14-2012, 07:21 PM   #14
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Hi rastiazul,

I had a look again your config and the reason you didn't find this because this one is at the server side.
You can't change this behaviour on the client side only at the server side.
When the client logging in to the server the config will run the route add command which is adding the remote gateway into the local routing table. (obviously it depends on the config how this behaves)

I had routing problem on my config when I installed openvpn and this was the issue in my config too.
When the redirect-gateway was in my config and I tried to reach a local PC on the LAN the whole traffic went through on the vpn.
I had checked it with tcpdump and I was really surprised about this behaviour. For example I pinged a local pc and the traffic went through on the server/vpn.

So check the server side instead of client side.
 
Old 04-15-2012, 09:07 AM   #15
rastiazul
Member
 
Registered: Feb 2006
Location: Costa Rica
Distribution: GalliumOS, Lubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
i dont have access to the server but if it works on other machines, it should work on here
 
  


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
[SOLVED] sound starts at login, then stops shortly after whitshade Ubuntu 1 10-31-2011 04:37 PM
[SOLVED] Booting stops after kernel starts ToK Gentoo 8 05-29-2011 07:08 AM
httpd starts and stops directly RienParhan Linux - Server 1 02-16-2007 01:04 PM
Mysql starts and suddendly stops braungiobi Linux - Software 4 03-13-2005 09:27 AM
Postfix stops as soon as it starts jonlake Fedora 3 06-19-2004 10:04 AM

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

All times are GMT -5. The time now is 05:43 AM.

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