Im trying to connect two networks with ipsec. But its not working, after install and configure ipsec when I execute this command "service ipsec start", I dont get any error, but with "ifconfig" command none tunnel appear. With the command "service ipsec status" appears "ipsec running no tunnels up".
Installation and configuration steps:
I have a virtual box machineA with 2 interfaces:
eth1: 172.20.0.1
eth2: 172.30.0.1
A second virtual box machineB with 2 interfaces:
eth1: 172.20.0.2
eth2: 172.40.0.2
1) To install and configure the ipsec the steps I followed was this:
yum install openswan
2) Then in this file: nano /etc/ipsec.conf
include /etc/ipsec.d/user.conf
3) In this file: nano /etc/ipsec.d/user.conf
conn=tun
authby=secret
type=tunnel
left=172.20.0.1
leftid=172.20.0.1
leftsubnet=172.30.0.0/24
right=172.20.0.2
rightsubnet=172.40.0.0/24
ike=aes256-sha1;modp2048
phase2=esp
phase2alg=aes256-sha1;modp2048
4) Then in this file: nano /etc/ipsec.secrets
%any %any : PSK "password"
Do you see why its not working?
Installation and configuration steps:
I have a virtual box machineA with 2 interfaces:
eth1: 172.20.0.1
eth2: 172.30.0.1
A second virtual box machineB with 2 interfaces:
eth1: 172.20.0.2
eth2: 172.40.0.2
1) To install and configure the ipsec the steps I followed was this:
yum install openswan
2) Then in this file: nano /etc/ipsec.conf
include /etc/ipsec.d/user.conf
3) In this file: nano /etc/ipsec.d/user.conf
conn=tun
authby=secret
type=tunnel
left=172.20.0.1
leftid=172.20.0.1
leftsubnet=172.30.0.0/24
right=172.20.0.2
rightsubnet=172.40.0.0/24
ike=aes256-sha1;modp2048
phase2=esp
phase2alg=aes256-sha1;modp2048
4) Then in this file: nano /etc/ipsec.secrets
%any %any : PSK "password"
Do you see why its not working?
Last edited: