更新 'iptables/企业级防火墙技术IPtables.md'

This commit is contained in:
diandian 2024-05-22 10:58:14 +08:00
parent bf90ec5a6a
commit eaf2b93b9a
1 changed files with 315 additions and 314 deletions

View File

@ -311,5 +311,6 @@ DNAT:要把别人的公网ip换成我们内部的IP
面试题
```shell
[root@xingdian ~]# iptables -t nat -A PREROUTING -p tcp -d 192.168.122.1 -dport 80 -j REDIRECT --to-destination 192.168.1.1:8080
访问一个地址的80端口跳转到另外一个地址的8080端口
[root@xingdian ~]# iptables -t nat -A PREROUTING -p tcp -d 192.168.122.1 -dport 80 -j DNAT --to-destination 192.168.1.1:8080
```