Author Topic: using openvpn on linux  (Read 7017 times)

lwkoon

  • Guest
using openvpn on linux
« on: August 04, 2010, 04:00:15 PM »
hi Reuben,

when i use linux issue "openvpn --config bolehroute.ovpn"

i got connected but it won't give me the routes
error:-
NOTE: unable to redirect default gateway -- Cannot read current default gateway from system

i have to manual add route to be able to ping 10.10.10.1

any automated way to workaround?


Regards,
eddie_lim - lowyat.net



Offline Reuben

  • Chief Doraemon
  • Administrator
  • Admiral
  • *****
  • Posts: 6878
Re: using openvpn on linux
« Reply #1 on: August 04, 2010, 04:02:45 PM »
could you post the full log?

What flavour of linux are u using?
*If you like my service/support, please consider posting a positive feedback here*<3



Co-Founder/Administrator

lwkoon

  • Guest
Re: using openvpn on linux
« Reply #2 on: August 04, 2010, 05:13:32 PM »
Using centos 5.4
console mode without GUI

initially what i wanted to do is NATing all the traffic via the linux router through ur OpenVPN channel, via tun0

my log will be

Wed Aug  4 17:11:58 2010 OpenVPN 2.1.1 i386-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 26 2010
Wed Aug  4 17:11:58 2010 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Wed Aug  4 17:11:58 2010 WARNING: file 'lwkoon.key' is group or others accessible
Wed Aug  4 17:11:58 2010 UDPv4 link local: [undef]
Wed Aug  4 17:11:58 2010 UDPv4 link remote: 92.48.72.23:1194
Wed Aug  4 17:12:07 2010 [server] Peer Connection Initiated with 92.48.72.23:1194
Wed Aug  4 17:12:09 2010 TUN/TAP device tun0 opened
Wed Aug  4 17:12:09 2010 /sbin/ip link set dev tun0 up mtu 1500
Wed Aug  4 17:12:09 2010 /sbin/ip addr add dev tun0 local 10.10.12.130 peer 10.10.12.129
Wed Aug  4 17:12:09 2010 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
Wed Aug  4 17:12:09 2010 Initialization Sequence Completed

lwkoon

  • Guest
Re: using openvpn on linux
« Reply #3 on: August 05, 2010, 01:41:42 AM »
so no solution?

is manual add route the only solution?

Offline Reuben

  • Chief Doraemon
  • Administrator
  • Admiral
  • *****
  • Posts: 6878
Re: using openvpn on linux
« Reply #4 on: August 05, 2010, 09:07:19 AM »
Give me a while ^_^
*If you like my service/support, please consider posting a positive feedback here*<3



Co-Founder/Administrator

Offline PitBoss

  • Administrator
  • Admiral
  • *****
  • Posts: 1250
Re: using openvpn on linux
« Reply #5 on: August 05, 2010, 10:10:59 AM »
Hi,
1. have you done the ip forwarding?
2. Is your firewall/iptables/selinux enable? Please disable this.
3. Did you make any modification to the config file?
4. Please paste the config file you are using.

I sort this out once I get the info from you. BTW, is this local server or headless?



Co-Founder / Administrator

lwkoon

  • Guest
Re: using openvpn on linux
« Reply #6 on: August 05, 2010, 12:37:41 PM »
Nevermind, i have found a work around
the problem is the linux openvpn can't detect the ppp0 default route from linux.
just delete the default route and add 219.93.218.177 to the linux box
then start the openvpn, the openvpn will give u the routing that bolehvpn server has set.

Offline Reuben

  • Chief Doraemon
  • Administrator
  • Admiral
  • *****
  • Posts: 6878
Re: using openvpn on linux
« Reply #7 on: August 05, 2010, 01:56:24 PM »
Thanks lwkoon for updating us
*If you like my service/support, please consider posting a positive feedback here*<3



Co-Founder/Administrator

Offline Reuben

  • Chief Doraemon
  • Administrator
  • Admiral
  • *****
  • Posts: 6878
Re: using openvpn on linux
« Reply #8 on: November 23, 2010, 02:53:54 PM »
might be in /etc/openvpn
*If you like my service/support, please consider posting a positive feedback here*<3



Co-Founder/Administrator