
iptables
欠了三年一场梦
这个作者很懒,什么都没留下…
展开
-
Linux从入门到放弃 iptables DNAT端口转发
配置 [root@7 ~]# iptables -t nat -A PREROUTING -d 192.168.1.1 -p tcp --dport 777 -j DNAT --to-destination 172.16.1.7:22 [root@7 ~]# iptables -t nat -nL Chain PREROUTING (policy ACCEPT) target prot...原创 2020-02-12 17:19:46 · 338 阅读 · 0 评论 -
Linux从入门到放弃 iptables SNAT源地址转发
公网 [root@7 ~]# iptables -t nat -A POSTROUTING -s 172.16.1.0/24 -j SNAT --to-source 192.168.1.1 [root@7 ~]# vim /etc/sysctl.conf # sysctl settings are defined through files in # /usr/lib/sysctl.d/, /...原创 2020-02-12 16:43:06 · 417 阅读 · 0 评论 -
Linux从入门到放弃 iptables
iptables中常用的参数以及作用 参数 作用 -P 设置默认策略 -F 清空规则链 -L 查看规则链 -A 在规则链的末尾加入新规则 -I num 在规则链的头部加入新规则 -D num 删除某一条规则 -s 匹配来源地址IP/MASK,加叹号“!”表示除这个IP外 -d 匹配目标地址 -i 网卡名称 匹配从这块网卡流入的数据 -o 网卡名称...原创 2020-02-12 16:13:27 · 395 阅读 · 0 评论