Hello,
I have a problem with connection between 2 linux machine. on GNS3 project
Diagram network
[ LINUX_A eth0: 192.168.1.1/24 (internal_interface) | eth1: 192.168.9.2/24 (external_interface) ] ----------> ROUTER <------------- [ LINUX_B eth1: 192.168.8.2/24 (external_interface) | eth0: 192.168.2.1/24 (internal_interface) ].
I wanna that LAN from both site see each other using connection from LINUX_A (client) into LINUX_B(server)
[LINUX_B] - server.conf contain (principale things):
ifconfig 10.8.0.0. 255.255.255.0
push "route 10.8.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
client-config-dir ccd
route 192.168.1.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
client-to-client
- and /etc/openvpn/ccd/client2 (contain: iroute 192.168.1.0 255.255.255.0 )
[LINUX_A] client.conf important setting [ remote 192.168.8.2 ]
LINUX_B: #openvpn --config server.conf
LINUX_A: #openvpn --config client.conf
and obtain error like:
/sbin/ip route add 192.168.1.0/24 via 10.8.0.1 RTNETLINK answers: File exists
Error:linux route add command failed: external program exited with error status: 2
/sbin/ip route add 10.8.0.0./24 via 10.8.0.5 RTNETLINK answers: File exists
Error:linux route add command failed: external program exited with error status: 2
Please help me with some tips,give me an idea or something...plssss
PS. LINUX_A machine can ping machine from 192.168.2.0 but just him. Other machine from 192.168.1.0 can't do that or reverse (192.168.2.0 into 192.168.1.0)
OpenVPN connect 2 site
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue Jan 31, 2017 3:12 pm
Re: OpenVPN connect 2 site
Nobody can help me ? no one ?
-
- OpenVPN Protagonist
- Posts: 11136
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue Jan 31, 2017 3:12 pm
Re: OpenVPN connect 2 site
thank you...I readed many times that links but doesn't work...
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue Jan 31, 2017 3:12 pm
Re: OpenVPN connect 2 site
Thank you for nothing and thank you smart guy who send me to read tutorial without read my problem.
The solution :
[ topology subnet ]
[ push 192.168.2.0 255.255.255.0 ]
[ client-config-dir ccd ]
[ route 192.168.1.0 255.255.255.0 ]
in /etc/openvpn/ccd/server (his name must be the same with what u declare at questions when u create certificate)
[ iroute 192.168.1.0 255.255.255.0 ]
Now ...when you start openvpn client or server it gives you an ip which can be different what u have in table route so check before !!!
The solution :
[ topology subnet ]
[ push 192.168.2.0 255.255.255.0 ]
[ client-config-dir ccd ]
[ route 192.168.1.0 255.255.255.0 ]
in /etc/openvpn/ccd/server (his name must be the same with what u declare at questions when u create certificate)
[ iroute 192.168.1.0 255.255.255.0 ]
Now ...when you start openvpn client or server it gives you an ip which can be different what u have in table route so check before !!!
-
- OpenVPN Protagonist
- Posts: 11136
- Joined: Fri Jun 03, 2016 1:17 pm
Re: OpenVPN connect 2 site
I assure you, it does work .. you just did it wrong.chucki21 wrote: thank you...I readed many times that links but doesn't work...
I read your problem as did others but you did not post any details we could use to help.chucki21 wrote:Thank you for nothing and thank you smart guy who send me to read tutorial without read my problem
In future .. Please see:
HOWTO: Request Help !
Also,
- NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
- You are advised to change your LAN to a more unique RFC1918 compliant subnet. f.e 192.168.143.0/24