`
zhtch_123
  • 浏览: 85166 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

iptables配置样例

 
阅读更多
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
## 将8080端口转发至80端口
COMMIT
# Completed on Thu Jan 12 13:37:26 2012
# Generated by iptables-save v1.4.7 on Thu Jan 12 13:37:26 2012
*filter
:INPUT ACCEPT [6:1658]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [308:474712]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT
COMMIT
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics