Restrict traffic to local network and VPN using ufw or iptables
- by Piezo Pea
I want to restrict all traffic from my ubuntu-machine to come or go from the local network (eth0) or from or to my VPN (tun0).
It should be possible to connect the router in the local network but not possible to leave the local network not using the VPN.
Since i have no experience with iptables and i couldn't find some how-to i tried ufw but i did not succeed.
Thank you for some hints or code snippets how to come closer!