CentOS测试通过


首先

$lsusb

显示网卡芯片ID0fe6:9700


国外有人提供了qf9700的源代码。网址是
http://mquin.livejournal.com/178482.html


自己内核是2.6.32下载解压qf9700-2.6.32.tar.gz

make生成qf9700.ko

然后modprobusbe net

$insmod ./qf9700.ko

运行ifconfig看到了eth1


网卡安装完毕,开始共享上网

eth0:连接外网

eth1:连接内网


在服务器上执行下面几条命令:
echo "1"> /proc/sys.Net/ipv4/ip_forward 1 打开IP转发,1表示转发;0表示不转发
上面这个命令也可以通过修改/etc/sysctl.conf实现,在:ip_forward =1
其余命令是:
iptables -F
iptables -PINPUT ACCEPT
iptables -PFORWARD ACCEPT
iptables -t nat-A POSTROUTING -o eth0 -j MASQUERADE  打开NAT



测试方案:

配置eth1ifconfigeth1 192.168.55.254 netmask 255.255.255.0

eth1连接客户机 并配置ip192.168.55.1 255.255.255.0 gateway 192.168.55.254

客户机 ping 8.8.8.8测试通过,测试网速近似为外网接入速度



存在问题:eth1 ip配置后会自动恢复为未配置状态,待解决