Tunnel and Transport Mode in IPSec, is it possible to combine them?

I’ve been wondering between two cases,

1 – tunnel from A to C and a tunnel from B to D, would it be possible to send a packet for A to D?

2 – Transport from A to D, and let’s say tunnel from B to D

Would it be possible to send a packet in any of these cases?

I assume for case 1 it wouldn’t be possible because of SA, and decryption would get messy But for the second case, I mean, that does sounds logical to me..

Could you share your thought?

Ubuntu server used as ipsec vpn router

Could you please help me to configure simple ubuntu router?

I have configured very simple 2 port ubuntu router, 1 wan and 1 lan port. source How To: Build a Simple Router with Ubuntu Server 18.04.1 LTS (Bionic Beaver) by Blaz Valentinuzzi.

I also setup VPN server using IKEv2-setup guide, source Set up Ubuntu Server 18.04 as an IKEv2 VPN server by George MacKerron.

Could some one help me to get it working?

Secure ways to share IPsec Pre-Shared Keys

I’m looking to setup a Site to Site IPsec VPN with a 3rd party and require to give a pre-shared key with the 3rd party for authentication as described here.

It mentions you should share this key over Phone/Fax/SMS rather than over the internet. The benefit I can see of over the phone is that once shared and configured there is no audit trail or copy of this key. If there are any issues we simply generate a new key and configure on the other end.

Would it be safer and more secure to share this pre-shared key over the phone or via PGP Email? Are the risks associated with “tapping the phone line” negligible in this instance?

Could IPSec flows be decrypted using PSK [duplicate]

This question already has an answer here:

  • IPsec with PSK: Can PSK be used for passive eavesdroping? 1 answer

I created an IPSec tunnel between two VMs using StrongSwan. It relies on a Pre-Shared Key. I wonder, if this key is leaked, what could an attacker perform? Would he/she be able to decrypt previous exchanges? Could he/she perform a MITM without be detected? And more generally, what is the impact?

Some details:

  • Mode Tunnel
  • auth-trunc hmac(sha256)
  • enc cbc(aes)

How can I make sure ping traffic over ipsec is going outside?

I’ve got a VPN tunnel (ipsec / StrongSwan) setup, connected. The other side is apparently able to ping me through the tunnel. However a ping from my side is said to be never received on the other side. The other side (that I cannot control) is thus assuming it’s a configuration issue from my side.

I’m really not sure about this, because I can see the ping packets going out when tcpdumping:

$   ping -c 5 192.168.33.1 PING 192.168.33.1 (192.168.33.1) 56(84) bytes of data. --- 192.168.33.1 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4009ms  (at the same time in another console) $   tcpdump host REMOTE 09:22:07.539582 IP LOCAL > REMOTE: ESP(spi=0xXXXXXX,seq=0x3), length 132 09:22:08.547608 IP LOCAL > REMOTE: ESP(spi=0xXXXXXX,seq=0x4), length 132 (... one packet per ping ...) 

The ESP traffic is obviously my ping. To make sure I’ve disabled all firewalling from my side.

Thus my question: How can I make sure the ping packets are going out and received? What can be the cause and what can I do more to help debug the issue?

As a side note, I’ve got another VPN setup and working, using the exact same configuration.