Question

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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.