Following this tutorial : => https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ikev2-vpn-server-with-strongswan-on-ubuntu-20-04#prerequisites
step 6 has us do ip route show default
and sample output is : Output default via your_server_ip dev eth0 proto static
Then in editing the /etc/ufw/before.rules we need to insert
*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
The text states : “Near the top of the file (before the *filter line), add the following configuration block. Change each instance of eth0 in the above configuration to match the interface name you found with ip route.”
What is the ‘interface name’ referred to there ? If the author meant your_server_ip he would have stated that. In any case my ‘your_server_ip’ is not in the 10.10.10.0/24 range…
Anyway I don’t understand what this bit means.
Thanks for any assistance.
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!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
You need to change the instance which in your case might not be
eth0
. You get the interface name by running theip route show default
command, and you will see the interface after theyour_ip dev
part.You can also check that using the
ip addr
command.The
10.10.10.0/24
range is, I believe, the one that you’ve defined in step 4 asrightsourceip=10.10.10.0/24
. This option instructs the server to assign private IP addresses to clients from the specified10.10.10.0/24
pool of IPs.Hope that this helps!
Best,
Bobby
In your instance, “eth0” is the interface name. (Output default via your_server_ip dev **eth0 **proto static)
The interface doesn’t need to be modified from what’s in the tutorial’s example.