Score:0

Block all traffic to/from VPS when OpenVPN client isn't connected

sd flag

So i have managed to setup an OpenVPN VPS. My public clientside IP is static.

For an abundance of security I'd like to automate a firewall blocking all traffic when the VPN client isn't connected. When client connects, traffic can flow so open up firewall.... Almost like a soft shutdown except purely a drop all unless from clientside static IP.

Any ideas how to implement this? I understand that I can't drop all incoming when I'm using it as a VPN server so realistically at present I can manually achieve this by firewall drop all from all type deal - I'd just prefer to automate.

djdomi avatar
za flag
deny all, allow myip and tun/tap but what would you like to reach with this?
sd flag
I can do this but then the VPN server can't access anything but myip. I just want to auto deny all upon disconnect of vpn client. When reconnecting i want to open up again for the duration of the vpn session. I use vpn sporadically but it is public facing so I don't want to worry about it's hardening while online and open.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.