Securing host and connecting using VPN

Amplificator

Member
Aug 5, 2020
21
2
8
37
I've installed Tailscale which is a mesh VPN and it works just fine.

But now I want my Proxmox host (and Backup Server host) to block all incoming traffic on my main interface (enp6s0) and only allow incoming traffic on the tailscale0 device.

How would the command line for that look like so it works on both PVE and PBS? PBS features no firewall web-interface so it needs to be command line.
 
Last edited:
I fixed it myself by trial and error.. I ran the following commands:

Code:
iptables -A INPUT -i tailscale0 -p tcp -m tcp --dport 8007 -j ACCEPT
iptables -A INPUT -i enp6s0 -p tcp -m tcp --dport 8007 -j DROP
iptables -A INPUT -i tailscale0 -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -i enp6s0 -p tcp -m tcp --dport 22 -j DROP

..and then did iptables-save after confirming that everything worked :)