ubuntu锐捷认证双网卡共享网络

/ #电脑相关 / 0 comment

双网卡共享上网
/etc/network/interfaces

auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0

或者使用network-manager。切换/etc/NetworkManager/nm-system-settings.conf

修改MAC地址,锐捷认证

sudo ifconfig eth0 hw ether XXXXXXXXXXXX
sudo mentohust
sudo ifconfig eth1 192.168.0.1 netmask 255.255.255.0

初始转发/etc/init.d/rc.local

iptables -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
回应