VPN接続があり、すべてのトラフィックがこのVPN接続を使用していることを確認したい。
iptablesを使用することを考えている。
誰かのアイデア?
10 x
承認された回答:
起動時にこのスクリプトを実行することで、投稿で説明されている問題を解決しました
# Delete all existing rules
iptables -F
# Allow from local network
iptables -A OUTPUT -d 192.168.2.0/24 -j ACCEPT
iptables -A OUTPUT -s 192.168.2.0/24 -j ACCEPT
# Allow OpenVPN
iptables -A OUTPUT -p udp --dport 1194 -j ACCEPT
# Deny eth0
iptables -A OUTPUT -o eth0 -j DROP