LINUX Hosts and Internet sharing (using LINUX as a simple router)

Source: Internet
Author: User
LINUX as a host, share Intranet Internet access (use LINUX as a simple router)-Linux Enterprise Application-Linux server application information, the following is a detailed description. LINUX network settings:
Intranet IP Address: 192.168.0.1 (as long as it is in the same network segment as WINDOWS)
Subnet Mask: 255.255.255.0
Gateway: NULL (automatically obtained)
DNS: according to data centers in different regions

WINXP settings:
192.168.0.2 (must be in the same network segment as LINUX)
255.255.255.0
192.168.0.1 (which is the linux ip address. use LINUX as the gateway)
DNS is the same as host.

Use KWRITE to open/etc/rc. d/rc. local on the LINUX host (the purpose is to enable the LINUX routing function. Some releases are opened by default, but more are not opened by default. You need to set this simply. Note the IP address at the end)

Add content at the end
Echo "1">/proc/sys/net/ipv4/ip_forward
Modprobe ip_nat_ftp
Modprobe ip_conntrack
Modprobe ip_conntrack_ftp
Modprobe ip_conntrack_irc
/Sbin/iptables-t nat-a postrouting-o ppp0-s 192.168.0.1/24-j MASQUERADE
Run rc. local.

Then, you can use LINUX as the Intranet host.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.