
Wireguard サーバーといくつかの Wireguard クライアントをセットアップしました。クライアントからのトラフィックはすべてサーバー経由でルーティングされます。現在、サーバーのパブリック IP は VPN-IP としてブラックリストに登録されており、いくつかの Web サイトにアクセスできなくなっています。そのため、送信トラフィック (すべての Wireguard クライアントからのポート 80/443 要求) を外部の切り替え可能な HTTP プロキシにルーティングして、VPN を難読化したいと考えています。私は iptables ルールの設定の専門家ではないので、必要なルールの設定を手伝ってくれる人がいないか尋ねたいです。
私は持っている:
# delete all rules
iptables -F
iptables -X
# deny all incoming
iptables -P INPUT DROP
# deny all forwarding
iptables -P FORWARD DROP
# allow loopback
iptables -A INPUT -i lo -j ACCEPT
# allow established and related
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# allow incoming wireguard connections
iptables -A INPUT -p udp --dport 443 -i eth0 -j ACCEPT
# activate masquerading on postrouting
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# allow wg-clients to local dns
iptables -A INPUT -i wg0 -s 10.8.0.0/24 -d 10.8.0.1 -p udp --dport 53 -j ACCEPT
# allow wg-clients to the world
iptables -A FORWARD -i wg0 -o eth0 -s 10.8.0.0/24 -j ACCEPT
# allow the world to answer wg-clients
iptables -A FORWARD -i eth0 -o wg0 -d 10.8.0.0/24 -m conntrack --ctstate ESTABLISHED -j ACCEPT```