Last active
December 9, 2015 04:40
-
-
Save denisshevchenko/4910e8f38b6eebe1649a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rule: all outgoing requests to :80 -> 127.0.0.1:4444 | |
sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
# Rule: all outgoing requests to www.zalora.com.tw:80 -> 127.0.0.1:4444 | |
sudo iptables -t nat -A OUTPUT -p tcp -d www.zalora.com.tw --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
# Delete these rules | |
sudo iptables -t nat -D OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
sudo iptables -t nat -D OUTPUT -p tcp -d www.zalora.com.tw --dport 80 -j DNAT --to-destination 127.0.0.1:4444 | |
# View all rules | |
sudo iptables -t nat -L -n -v | |
# Delete all rules | |
sudo iptables -t nat -F | |
sudo iptables -t mangle -F | |
sudo iptables -F | |
sudo iptables -X |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment