Created
March 24, 2018 07:44
-
-
Save wjx0912/af5f0c86a66c39249663258f9aece874 to your computer and use it in GitHub Desktop.
shell script: iptables demo
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
# 来自65010的请求转发到80 | |
iptables -t nat -A PREROUTING -p tcp --dport 65010 -j REDIRECT --to-port 80 | |
# 来自192.168.8.99的数据全部丢弃 | |
iptables -A INPUT -s "192.168.8.99" -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment