[Openswan Users] Routing troubles

Dennis J. dennisml at conversis.de
Tue Jul 14 22:32:24 EDT 2009


Hi,
I'm trying to configure a subnet-to-subnet tunnel between the subnets 
192.168.1.0/24 and 192.168.4.0/24. I'm doing this on two Centos 5.2 boxes 
that are directly connected to the internet. No NATs or firewalls.

As far as I can see the tunnel gets established but my problem is that I 
can only ping the machines from the other subnet from the gateway. That is 
on the left gateway I can ping and ssh connect the machines from the right 
subnet and from the right gateway I can access the machines in the left 
subnet but I the actual machines in the subnets cannot connect to each other.

My config looks like this:
conn vpn
         authby=secret
         left=<external-ip-left>
         leftsubnet=192.168.1.0/24
         leftsourceip=192.168.1.1
         leftnexthop=%defaultroute
         right=<external-ip-right>
         rightsubnet=192.168.4.0/24
         rightsourceip=192.168.4.1
         rightnexthop=%defaultroute
         auto=start

What is strange is that as soon as I start the tunnel openswan seems to add 
it's own definition on for 192.168.1.1 and 192.168.4.1 respectively.
Right now the ip config on the left machine looks like:

eth0(ext): inet 192.168.1.1/32 scope global eth0
eth1(int): inet 192.168.1.1/24 brd 192.168.1.255 scope global eth1:0

the eth1 subnet is the one I defined but the eth0 one gets added when I 
start the tunnel. The same happen on the other side.

What do I have to change so that the machines from the two different 
subnets can reach each other?

Regards,
   Dennis


More information about the Users mailing list