本文描述一些iptables的基础知识和使用方法.最后记录一个wifi共享3G上网,以及禁止wifi内某个IP通过3G联网的例子. 一. 在Linux系统中,防火墙,网址转换(NAT),数据包记录以及流量统计这些功能是由Netfilter子系统所提供的,而iptables是控制Netfilter的工具. 在使用iptables前,需要先了解一下三种网络数据流向.它们分别是: 1.网卡 à 本地程序 2.本地程序 à 网卡 3.网卡A à 网卡B(A和B均接入本机) 网络数据从网卡进来后,在传输过
windows网络连接别名 C:\Windows\System32\drivers\etc目录下的hosts文件中添加 127.0.0.1 localhost 192.168.1.100 proxy.zj.chinamobile.com linux网络连接别名 /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 192.