赞
踩
systemctl stop iptables
vim /etc/sysctl.conf
net.ipv4.ip_forward=1
sysctl -p
echo 0 > /sys/devices/virtual/net/br0/bridge/nf_call_iptables
echo 0 > /sys/devices/virtual/net/br0/bridge/nf_call_ip6tables
echo 0 > /sys/devices/virtual/net/br0/bridge/nf_call_arptables
##2 当宿主机使用手机等上网时,此时宿主机为私网地址,需要启用snat转发,虚拟机方可和互联网连接:
iptables -t nat -A POSTROUTING -o “手机usb网卡名” -j MASQUERADE
参考文档:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。