Using Centos7.2 's firewall to implement NAT functionality
Two commands to implement
echo "Net.ipv4.ip_forward = 1" >>/etc/sysctl.d/ip_forward.conf # #配置路由转发
Firewall-cmd--permanent--add-masquerade # #配置伪装 (NAT)
System installation using minimal installation, virtual machine only 1.5G size, very convenient to achieve cross-network access to the Internet
Installing three network cards for a virtual machine
Use DHCP to automatically obtain IP, gateway, and DNS to access the extranet
Two other network cards, custom subnet, network card without gateway and DNS
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/87/42/wKioL1fZG1-Cms7WAAFI7GsBZ4A990.png-wh_500x0-wm_3 -wmp_4-s_2500662834.png "title=" Nat.png "alt=" Wkiol1fzg1-cms7waafi7gsbz4a990.png-wh_50 "/>
This article from "Fymint" blog, declined reprint!
Route forwarding and NAT using a CentOS virtual machine