ana*_*nik 4 linux firewall iptables netfilter
我将使用iptables端口转发来侦听来自 LAN 端口 8080 上的请求,并使用端口 80 上的容器进行响应,如下所示:
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.15 --dport 8080 -j DNAT --to 10.0.3.103:80
Run Code Online (Sandbox Code Playgroud)
我不确定这条规则是否正确(请随时纠正),但问题是:
iptables不能做到这一点,什么可以?iptables有一个注释模块,它应该可以满足您的需求。添加规则时,可以添加如下注释:
iptables -A INPUT -p icmp -j ACCEPT -m comment --comment "Allow incoming ICMP"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3268 次 |
| 最近记录: |