
共享上网
欠了三年一场梦
这个作者很懒,什么都没留下…
展开
-
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从入门到放弃 共享上网
注释掉客户端eth0(可以)网关和DNS [root@m ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0 PREFIX=24 #GATEWAY=192.168.1.254 # 注释掉 #DNS1=192.168.1.254 # 注释掉 IPV6_PRIVACY=no [root@m ~]# vim /etc/sysco...原创 2019-12-30 19:21:30 · 129 阅读 · 0 评论