OpenVPN connect 2 site
Posted: Tue Jan 31, 2017 3:36 pm
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)
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)