Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TCP_TRAFFIC_PORT=5015
- PROXY_PORT=443
- _apply_outbound_rules() {
- # Forward outgoing packets through the proxy port
- sudo iptables -t nat
- -I OUTPUT 1
- -p tcp --destination-port $TCP_TRAFFIC_PORT
- -j DNAT --to-destination :$PROXY_PORT
- # Send packets to 5015 port after forwarding (this is likely the rule to fix)
- sudo iptables -t nat
- -I POSTROUTING 1
- -p tcp --destination-port $PROXY_PORT
- -j SNAT --to-source :$TCP_TRAFFIC_PORT
- }
- apply_outbound_rules
Add Comment
Please, Sign In to add comment