Score:0

IPSec site2site tunnel + vpn

vn flag

In our research project, we needed to deploy a server "Molly" at another company. They made us set up a IPSec tunnel to their firewall/gateway and from there, the comms are forwarded to our server. I configured StrongSwan on our gateway machine "Dolly" and this works pretty ok. Dolly has a public address, say 1.1.1.1, and a virtual address 10.10.1.1, needed for site2site tunnel attached to the same network card "eth0". On the other side, Molly has 10.10.2.1. While I'm logged on to Dolly, I can ping Molly at this address without any problem, despite the fact that the routing is not explicitly set up by StrongSwan (the subnet 10.10.2.1/24 does not appear in the routing table)

I would like to give our team access to Molly. Dolly (our gateway) is on a big network, so I though of creating a vpn run by Dolly where the team members can connect. I configured OpenVPN with 10.10.1.0/24 as the subnet address. OpenVPN sets 10.10.1.1 on its "tap0" device, I can connect to it, and I get 10.10.1.2 on my OpenVPN client's tap interface. I can ping 10.10.1.1.

So, I thought that I can simply (it wasn't!) bridge eth0 and tap0 on Dolly under br0, thus all messages traversing OpenVPN network would be made available for the StrongSwan tunnel. If anybody on the OpenVPN subnetwork sent packets to 10.10.2.1, they would show up on the bridge device on Dolly and, to the best of my understanding, would be pulled into the tunnel due to iptables settings of StrongSwan.

Yet, it doesn't happen... Pinging - and anything else - from any vpn member (e.g. 10.10.1.2) is not possible, it only works from Dolly (10.10.1.1). Restarting the tunnel with the bridge already in place goes smoothly but doesn't change the situation. I tried adding a routing rule on the client computer (10.10.1.2) saying to use 10.10.1.1 as a gateway to 10.10.2.0/24 but for some reason it rejects it ("Error: either "to" is duplicate, or "gw" is a garbage.").

I'm lost. Has anybody actually manage to achieve this sort of configuration?

Thanks in advance!

Szymon

Michael Hampton avatar
cz flag
What was the command that gave the error?
vn flag
So, the "big" error is that the ping / ssh doesn't reach Molly from the vpn clients. The "small" error appeared when I tried to introduce a routing rule for the vpn clients with "ip route add 10.10.2.0/24 via 10.10.1.1 dev br0"
Michael Hampton avatar
cz flag
OK? So what was it?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.