In Linux iptables, the NAT configuration can be used by one server to access the Internet, and the other server to access the internet. However, if one of them is a Linux system, it will be easy. Configure iptablesNAT. Step: 1. After net. ipv4.ip. forward0 in etc/sysctl. conf...
In Linux iptables, the NAT configuration can be used by one server to access the Internet, and the other server to access the internet. However, if one of them is a Linux system, it will be easy. Configure iptables NAT. Step: 1. set etc/sysctl. net. ipv4.ip. after forward = 0, change 0 to 1. 2. start iptables: # service iptables start. 3. the most important step is: # iptables-t nat-a postrouting-o eth0-s 192.168.10.100/24-j SNAT-to Internet ip www.2cto.com 4. View nat-related iptables rules: # iptables-t nat -- list (pay attention to the POSTROUTING item) 5. clear the filter and tables rules: # iptables-F # iptables-X 6. then the operation is complete, set the ip address and CIDR block on the other server to match the preceding ip address and CIDR block.
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