Creating an L2TP vpn tunnel over IPSec

In this series of mini articles, we describe how to deploy high-availability and secure Chainlink node. This article is dedicated to creating an L2TP vpn tonnel over IPSec for Guard VM, that will have access to Chainlink Virtual Private Cloud infrastructure.

Setting up IPSec

https://cdn-images-1.medium.com/max/1280/1*HxsTqHgm7XKar0F9NoMrzg.png

Warning. For strongswan-starter setup it is better to go to source #1. This step was skipped when setting up.

https://cdn-images-1.medium.com/max/1280/1*VYGeFEbsbKB9nY-b0lO9YQ.png
https://cdn-images-1.medium.com/max/1280/1*KlwbA67ndjCi7hmC1XqjNg.png
https://cdn-images-1.medium.com/max/1280/1*z-iWc8dQc3M2sCh5pRUoug.png
https://cdn-images-1.medium.com/max/1280/1*E1KIciY4uVdbo8NIqFYL6w.png
https://cdn-images-1.medium.com/max/1280/1*1wthr1ig-XjwFQV4X8vkgg.png

Setting up L2TP

https://cdn-images-1.medium.com/max/1280/1*mjh6my4fCDlTRaQ9DNOZYQ.png
https://cdn-images-1.medium.com/max/1280/1*AynTUt5G-tD9DbQFCJObzA.png

Note: It is mandatory that the local ip and ip range are specified correctly.

https://cdn-images-1.medium.com/max/1280/1*eQ77IP3jBxZgygpTy5qm1Q.png

Setting up PPP

https://cdn-images-1.medium.com/max/1280/1*cOCedUKfzjM-R5CwQrVbNQ.png
https://cdn-images-1.medium.com/max/1280/1*sDxmS--K6K73m_Eor5W0LA.png
https://cdn-images-1.medium.com/max/1280/1*HtnzxOLr8NHbc81yK1_bOA.png
https://cdn-images-1.medium.com/max/1280/1*6zhckvch09BnqtEqucmpDQ.png
https://cdn-images-1.medium.com/max/1280/1*eG0QLfIq-L-nxJRPwgBexA.png

Adding firewall rules (does not work temporarily with the firewall)

https://cdn-images-1.medium.com/max/1280/1*k3I-BUmp7UtFZVuRs1eYbQ.png

NAT settings

Required for local network and internet access with a vpn connection.

https://cdn-images-1.medium.com/max/1280/1*TsFNC4QEKtLmYkrZit4ZQA.png

Remember the rules, so that they are not wiped after restarting the server

Checking service status

Saving the rules

Let’s check that everything works. Turn off and on the server. Check that the rule for NAT is still in place.

Next we will set up 2FA on Guard VM via ssh.

Sources:

Last updated