I don't know how to apply the point of this tutorial

Connected Tutorial
This question is a follow-up to this tutorial:

Hi. 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.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @wojiciech,

In the /etc/ufw/before.rules file, you’ll have NAT rules like that

-A POSTROUTING -s -o eth0 -m policy --pol ipsec --dir out -j ACCEPT

-A FORWARD --match policy --pol ipsec --dir in -s -o eth0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360

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.