我有一个在 debian 7 上运行的 Web 服务并监听端口 8080。我想将 80 重定向到 8080 以进行入站连接并只允许端口 80。这是我的iptables
配置:
root@localhost:~# iptables -v -L --line-numbers
Chain INPUT (policy DROP 76 packets, 6266 bytes)
num pkts bytes target prot opt in out source destination
1 90 8898 ACCEPT all -- lo any anywhere anywhere
2 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
3 4515 3113K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num …
Run Code Online (Sandbox Code Playgroud)