Skip to content

Instantly share code, notes, and snippets.

@wjx0912
Created March 24, 2018 07:44
Show Gist options
  • Save wjx0912/af5f0c86a66c39249663258f9aece874 to your computer and use it in GitHub Desktop.
Save wjx0912/af5f0c86a66c39249663258f9aece874 to your computer and use it in GitHub Desktop.
shell script: iptables demo
# 来自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