哪里有关如何configuration一个普通的Linux机器(可能运行Ubuntu),有两个NIC的文档,以便eth0是来自Internet的input, eth1是输出到无线路由器?
当交通stream经时,我想分析一下。
使用现有的防火墙分发,例如smoothwall或ipcop 。 那会在晚些时候为你节省大量的麻烦和头痛。 如果你真的想进入高级路由器configuration的细节,看看LARTC 。
这不是什么特别的,你需要的只是一个好的防火墙脚本或框架,将NATstream量。
看看这个链接开始: http : //ubuntuforums.org/showthread.php?t=713874
search谷歌将返回无数的点击率,因为这个话题已被彻底调查。
我使用在Ubuntu上运行的shorewall。 很容易build立和维护,但它仍然有你可能需要的所有选项: http : //www.shorewall.net/two-interface.htm
以下是我在一些debian系统上使用的脚本:
#!/bin/sh ## This script starts an NAT internet gateway ## Settings # Internal Interface INTERNAL=eth1 # External Interface EXTERNAL=eth0 ## Ensure the modules are loaded # Load the NAT module modprobe iptable_nat # Load the transparent FTP modules modprobe ip_nat_ftp modprobe ip_conntrack_ftp # Load the transparent IRC modules modprobe ip_nat_irc modprobe ip_conntrack_irc modprobe ipt_MASQUERADE modprobe ipt_REDIRECT modprobe ipt_REJECT modprobe iptable_filter modprobe ip_conntrack modprobe ip_tables ## Flush the routing tables iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain ## Set up the NAT table iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE iptables --append FORWARD --in-interface $INTERNAL -j ACCEPT # Ensure that IP forwarding is on echo 1 > /proc/sys/net/ipv4/ip_forward
你也可以看看m0n0wall 。 我当地LUG的一个人广泛使用它。
要分析stream量,可以使用tcpdump