How to set up ufw rules for softether vpn?

January 21, 2015 4.1k views
I set softether referring above link. And I set an L2TP vpn.

My “ifconfig”

eth0 (I replaced my server ip with

Link encap:Ethernet HWaddr fa:16:3e:3c:b0:a0
inet addr: Bcast: Mask:
inet6 addr: fe80::f816:3eff:fe3c:b0a0/64 Scope:Link

Link encap:Local Loopback
inet addr: Mask:
inet6 addr: ::1/128 Scope:Host

Link encap:Ethernet HWaddr 00:ac:ab:80:3c:c7
inet addr: Bcast: Mask:
inet6 addr: fe80::2ac:abff:fe80:3cc7/64 Scope:Link

My dnsmasq.conf


My ufw setup

ufw default reject incoming
ufw default allow outgoing
ufw allow 500/udp
ufw allow 4500/udp
ufw allow 1701

I can’t connect to L2TP when I enable ufw. But it’s ok when ufw disabled.


1 Answer

You may try settings from here

most important is turn on ipv4 frowarding and NAT.

I haven’t try this myself, let me know if that works.


Have another answer? Share your knowledge.

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