Hi
I am trying to set up Freeswan between two Redhat servers (9.0 and 7.3).
They both have static ip addresses and I am using the net-to-net connection. I have installed version 1.99 with x.509 support rpm's.
192.168.1.0/24 --> LINUX FIREWALL A /VPN ========= LINUX FIREWALL B/VPN <---- 192.168.3.0/24
The following is an example of my ipsec.conf file:
conn manicentro-merced
left=216.219.56.200
leftsubnet=192.168.1.0/24
leftid=@left.test.com
leftrsasigkey=0sAQNzsT5wkoF....
leftnexthop=216.219.56.1
right=216.219.56.119
rightsubnet=192.168.3.0/24
rightid=@right.test.com
rightrsasigkey=0sAQNQdzFuK...
rightnexthop=216.219.56.117
auto=add
I have turned off the rp_filter on the external interfaces for both servers.
I have opened up upd 500 and have entered the following rules for the ESP protocol to the end of the script:
# === >> VPN << === #
# === >> IKE << === #
iptables -A INPUT -p udp -i eth0 --sport 500 --dport 500 -j ACCEPT
iptables -A OUTPUT -p udp -o eth0 --sport 500 --dport 500 -j ACCEPT
# === >> ESP << === #
iptables -A INPUT -p 50 -i eth0 -j ACCEPT
iptables -A OUTPUT -p 50 -o eth0 -j ACCEPT
# === >> AH << === #
iptables -A INPUT -p 51 -j ACCEPT
iptables -A OUTPUT -p 51 -j ACCEPT
When I start ipsec and bring up the tunnel, everything comes up fine and it indicates that the tunnel is stablished. However, I can not ping between the two subnets.
I think that it is a problem with my firewall script but I am not am iptables rules expert. Has anyone had any luck using freeswan with iptables? This is my first attempt with Freeswan and I would appreciate any help that could be offered.
Thank you,