Page 1 of 2
openvpn server connect to another server
Posted: Tue May 17, 2011 1:25 pm
by raisedtozero
i have 2 openvpn servers, lets name openvpn server A and openvpn server B
how can i do this setup??
clinet ---> openvpn Server A ----> openvpn Server B
so openvpn server A will act like a server to client and at the same time will act as client to server B
pls help.. how can i do this?
Re: openvpn server connect to another server
Posted: Tue May 17, 2011 1:30 pm
by janjust
* read the HOWTO
http://openvpn.net/index.php/open-sourc ... howto.html
* set up an openvpn server on B, then a client on A; make sure the connection between A and B is working
* set up an openvpn server on A, then make your pc a client to A
Re: openvpn server connect to another server
Posted: Tue May 17, 2011 2:59 pm
by raisedtozero
hello...
ok so heres the setup
client - server a - > server b
when i connect my server a to server b
heres the error
Tue May 17 18:54:27 2011 TCP connection established with 178.xxx:80
Tue May 17 18:54:27 2011 TCPv4_CLIENT link local: [undef]
Tue May 17 18:54:27 2011 TCPv4_CLIENT link remote: 178.xxxx:80
Tue May 17 18:54:28 2011 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Tue May 17 18:54:31 2011 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 2028', remote='link-mtu 1528'
Tue May 17 18:54:31 2011 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 2000', remote='tun-mtu 1500'
Tue May 17 18:54:31 2011 [server] Peer Connection Initiated with 178.33.86.196:80
Tue May 17 18:54:33 2011 TUN/TAP device tun0 opened
Tue May 17 18:54:33 2011 /sbin/ip link set dev tun0 up mtu 2000
Tue May 17 18:54:33 2011 /sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.5
Tue May 17 18:54:33 2011 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
Tue May 17 18:54:33 2011 Initialization Sequence Completed
but when i connect client to server b.. its working fine.
pls help janjust, and other fellas
Re: openvpn server connect to another server
Posted: Tue May 17, 2011 3:02 pm
by janjust
Tue May 17 18:54:31 2011 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 2028', remote='link-mtu 1528'
Tue May 17 18:54:31 2011 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 2000', remote='tun-mtu 1500'
don't specify 'tun-mtu 2000' in the config file for serverA.
Tue May 17 18:54:33 2011 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
how is serverA connected ? what is the default GW? a 3G modem? try specifying the default GW on the serverA side LAN using
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 12:03 am
by raisedtozero
actually, server a and server b are linux VPS..
server a is in USA, while server B is in France
their default gateway is the NIC card? how can i solved this problem
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 5:08 am
by xsurfer
raizedtozero: Why do you want to need such setup ( client ---> openvpn Server A ----> openvpn Server B ) ?
What is your purpose?
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 5:55 am
by raisedtozero
kawawang xsurfer

Re: openvpn server connect to another server
Posted: Wed May 18, 2011 6:29 am
by xsurfer
uu nga bro. just asking why you need it.
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 12:01 pm
by raisedtozero
@janjust, how can i do it?
client -> server a -> server b
server a and server b are just linux VPS
how can i add gateway, like proper steps.. thank you very much
pls help
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 1:31 pm
by xsurfer
wow raised, you're telling na its me na kawawa that I am asking questions, where you are also here asking questions yourself.
Can I say that you are also kawawa since you are asking pitifully? Dont say such things because you are just looking at a mirror and telling kawawa to yourself.
Let us just be respectful to one another here.
If you cannot say something nice, dont say something not nice even if others cannot understand your dialect.
You are acting like you are really knowledgeable. I know you. I know what forum you come from. I come from that forum too.
We all ask questions and need answers. Just be respectful buddy. I guess I have never talked to you in any manner that is disrespectful to you.
Oh! are you hurt by my question "What is your purpose?"
How can we understand what you are doing? So by understanding what you are doing will give the helper information on how to help you.
Re: openvpn server connect to another server
Posted: Wed May 18, 2011 2:40 pm
by janjust
raisedtozero: I already pointed out a few steps that you need to take (change mtu settings) ; what happens if you change the MTU setting and then try to get server A to talk to server B?
PS: please don't send me private messages (PMs); the likelihood of me helping decreases with each PM.
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 4:43 am
by xsurfer
I wonder if you use the same server B and server A have the same server option !
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 11:04 am
by raisedtozero
i still get this error,
Tue May 18 23:34:14 2011 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 11:15 am
by janjust
figure out what the default GW is on serverA (check '/sbin/ip route') then add
to the client config file on server A.
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 11:31 am
by raisedtozero
hello,
this is the reply from Server a
169.254.0.0/16 dev venet0 scope link
default dev venet0 scope link
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 11:40 am
by janjust
this server seems screwed up ; do a
and check the first entry
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 12:07 pm
by raisedtozero
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 40 byte packets
1 64.31.59.7 0.040 ms 0.020 ms 0.016 ms
2 208.115.192.49 152.492 ms * *
3 208.115.192.2 0.548 ms 64.125.188.181 0.505 ms 0.486 ms
4 64.125.188.181 0.632 ms 0.608 ms 0.586 ms
5 64.125.27.210 0.984 ms 64.125.26.210 0.867 ms 0.855 ms
6 64.125.12.186 1.560 ms 64.125.26.210 0.826 ms 64.125.12.186 1.516 ms
7 72.14.233.65 0.881 ms 72.14.233.67 0.887 ms 64.125.12.186 1.274 ms
8 72.14.238.243 24.467 ms 24.389 ms 72.14.233.65 1.137 ms
9 72.14.232.213 24.315 ms 72.14.233.87 35.708 ms 72.14.238.243 23.564 ms
10 72.14.232.213 23.548 ms 23.522 ms 209.85.253.133 32.475 ms
11 209.85.253.145 27.015 ms 209.85.253.133 31.980 ms 8.8.8.8 22.952 ms
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 12:09 pm
by janjust
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 12:14 pm
by raisedtozero
where will i put route-gateway?
in server a client config? server config? server a or server b. tnx
Re: openvpn server connect to another server
Posted: Thu May 19, 2011 12:26 pm
by janjust
some thinking on your part is required...
put this in the configuration file of the host that is throwing the 'cannot determine default gateway' message.