Debian serves as a LAN Gateway (server)

Source: Internet
Author: User
Debian is used as a LAN Gateway (server)-Debian information of the Linux release edition. The following is a detailed description. In November, it was job-hunter, who was so busy that the text on the blog was a bit anxious. Who told me to be an impatient person?

In December, I did two things. First, I read two chapters to gain an in-depth understanding of the computer system. I forgot one chapter at the end of the month. Second, debian linux is installed on the laptop, and the debian kernel is installed on the server. After a weekend, the lab machine is too junk. The firewall has not been fully configured. You need to learn the script and iptables to improve the network speed and access the foreign network!

Eth0 is an Internet Nic, and eth1 is an intranet Nic

The content of the/etc/network/interfaces file is as follows:

Auto lo eth0 eth1

Iface lo inet loopback

Allow-hotplug eth0
Iface eth0 inet static
Address 202.38.73.144
Netmask 255.255.0.0
Gateway 202.38.64.1


Iface eth1 inet static
Address 192.168.0.1
Netmask 255.255.255.0

Iptables settings are as follows:

Iptables-a forward-j ACCEPT

Iptables-a input-j ACCEPT

Iptables-a output-j ACCEPT

Iptables-t nat-a postrouting-o eth0 SNAT -- to 202.38.73.144

This firewall does not provide any protection, but only adds the ip camouflage function. Next, add the firewall function as required by the lab and use it as the boot setting.
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.