For more information, see linux Enterprise Application-Linux server application. One linux server, two subnets, 192.168.0.0/24, Gateway 192.168.0.1 (hardware router address), NIC address: 192.168.0.5
192.168.1.0/24, no gateway, NIC address: 192.168.1.1
Set NAT:
Modprobe ip_tables
Modprobe iptable_nat
Modprobe iptable_filter
Modprobe ip_conntrack_ftp
Modprobe ip_nat_ftp
Echo 1>/proc/sys/net/ipv4/ip_forward
Iptables-t nat-a postrouting-s 192.168.1.0/24-o eth0-j SNAT -- 192.168.0.5
After the configuration is complete, all the clients from 192.168.1.2, ping192.168.1.1, 192.168.0.5, and 192.168.0.1 will be successful.
The Internet is normal, but the client cannot access the Internet. I don't know why. Please give me some advice and wait online.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service