IPSec is a protocol suite that is used to secure traffic on a network. It is used to authenticate and encrypt traffic between two peers. It is commonly used in VPNs to secure the traffic between the client and the server. Difuse only implements PSK (Pre-Shared Key) based IPSec tunnels.
There are 4 buttons in the IPSec section of the web interface:
As you can see there are a lot of options to configure a peer, let's go over them one by one:
This is the name of the peer, it can be anything you want.
This is the local ID of the peer, it is used to identify the peer on your side of the tunnel. It can and probably should be an IP address.
This is the peer ID of the peer, it is used to identify the peer on the other side of the tunnel. It can and probably should be an IP address.
This is the version of the key exchange protocol that will be used to establish the tunnel. IKEv1 and IKEv2 are supported.
This is the local IP address of the peer, it is used to identify the peer on your side of the tunnel. It can and probably should be an IP address. FQDNs are not supported yet.
This is the remote gateway of the peer, it is the IP address of the peer on the other side of the tunnel. It can and probably should be an IP address. FQDNs are not supported yet.
This is the left side or local network of the tunnel, it is the network that is behind the peer on your side of the tunnel. It probably should be an IP that is separate from the subnet of the peer and subnet of LAN.
This is the right side or remote network of the tunnel, it is the network that is behind the peer on the other side of the tunnel.
These are the algorithms that will be used to encrypt the traffic between the peers. You can choose any combination of algorithms that you want, but you should choose the ones that are supported by the peer.
This is the pre-shared key that will be used to authenticate the peers. It should be a long and random string.
This is the number of times the device will try to establish the tunnel before giving up.
These are the firewall rules that will be applied to the traffic that is going through the tunnel. It's best to leave it at allow forwarding to WAN and LAN.