Wireguard 클라이언트에서 외부 프록시로 HTTP 요청을 전달하는 Wireguard 서버

Wireguard 클라이언트에서 외부 프록시로 HTTP 요청을 전달하는 Wireguard 서버

Wireguard 서버와 일부 Wireguard 클라이언트를 설정했습니다. 클라이언트의 모든 트래픽은 서버를 통해 라우팅됩니다. 이제 내 서버의 공개 IP는 VPN-IP로 블랙리스트에 등록되어 더 이상 여러 웹사이트에 액세스할 수 없습니다. 이것이 바로 VPN을 난독화하기 위해 나가는 트래픽(모든 Wireguard 클라이언트의 포트 80/443 요청)을 외부 전환 가능한 HTTP-프록시로 라우팅하려는 이유입니다. 저는 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```

관련 정보