By wojiciech
Connected Tutorial(This question is a follow-up to this tutorial):
How to Set Up an IKEv2 VPN Server with StrongSwan on Ubuntu 20.04Hi. Please give me an example. In step 6 i don’t know how to implement sentence:
“Change each instance of eth0 in the above configuration to match the interface name you found with ip route”
It is not clear. I have gone through the entire tutorial and the connection is not working. This is a point I don’t know what it should look like.
regards W.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @wojiciech,
In the /etc/ufw/before.rules file, you’ll have NAT rules like that
*nat
-A POSTROUTING -s 10.10.10.0/24 -o eth0 -m policy --pol ipsec --dir out -j ACCEPT
-A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE
COMMIT
*mangle
-A FORWARD --match policy --pol ipsec --dir in -s 10.10.10.0/24 -o eth0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360
COMMIT
See where on the first two lines after the IP address there is an eth0, You need to change that with your public interface. To see the public interface, type in
ip route show default
Your public interface should follow the word “dev”. For example:
default via your_server_ip dev eth1 proto static
In this case it’s eth1. So you need to change that in your /etc/ufw/before.rules file.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.