Using LINUX as a proxy (simple)

Source: Internet
Author: User
Use LINUX as a proxy (simple)-Linux Enterprise Application-Linux server application information. The following is a detailed description. Tutorial on using Linux for Routing

Now we will talk about how to use Linux as a router.

At the same time, we assume that our existing network environment

The public network is 218.75.54.128/gateway 127 mask 255.255.255.252

The Intranet uses 192.168.1.254 as the gateway and the mask is 255.255.255.0.

We recommend that you use Redhat9.0 as the basic system.

Linux is a good operating system. MS boss bill also said that he is currently the best open source software

The TCP protocol in Linux is also the best performance in all systems.

We only do this system for routing, and many things are not needed during installation.

Next we will start the installation. Because we do not install graphical interfaces, all the english languages must be selected. If

If you select Chinese, many characters will be garbled

You can select the keyboard and mouse type for the items you just selected. Generally, the default value is enough.

Here, we choose Custom installation "Custom"

Here we select the partition type. We recommend that you use automatic partitions for beginners.

Warning: all data will be lost after partitioning. Click YES.

There are three options: first, delete all Linux partitions on the hard disk.

The first is to delete all partitions, and the third is to keep all partitions.

Select 2 .. I also warned that all data will be lost.

Here is the GRUB boot option for startup. the default option is generally used.

Here is the network settings. in Linux, the network adapter starts from eth0 and then eth1 eth2 ....

Here we have two fast NICs. We recommend that eth0 be used as the internal nic and ETH1 be used as the external Nic.

When setting IP addresses, there are two options. The first option is to obtain IP addresses from DHCP, and the second option is effective at startup.

We cancel the first one and must hook the first 2nd.

Here is the firewall settings. We should first select NO

Just now, we chose the region language and time zone. It's very simple.

Set the super administrator password, that is, the system administrator root password.

Well, we just selected the software or system to be installed. We only chose telnet.

For future maintenance convenience. The installation is started below.

The Linux Password is case sensitive to all characters, and the/and \ symbols are also different.

Commands are not the same as windows or DOS, and they are completely two styles.

Windows users cannot get started with Linux.

The installation progress is displayed, which is convenient. Now we will wait for the installation to complete.

Such installation requires 1st disks and 3rd disks, which will be prompted at that time. You need to insert 3rd disks.

Insert 3rd disks and click OK.

This is to ask if you want to create a boot floppy disk for emergency recovery. We choose NO

After the installation is complete, click EXIT to restart.

OK. The installation is complete and the restart is complete.

Open and log on to the Linux system.

Use root to log on. root is the Super administrator. After login, it is displayed. # The average user is shown as $.

Now let's add a common user named eastart and set the password cniis.com.

The command format is useradd eastart.
Then password passwd eastart

OK. Now, log out of the Super administrator and log on to the system as a normal user.

The Command Format logout is successfully logged on. Then we switch from a common user to a super administrator for setting.

Command Format: su-root (note that there is a space between the front and back .)
After entering this command, the system will prompt you to enter the super administrator password OK.

Linux does not display the password for security reasons, so be careful when entering the password.

Now, let's set the project to start loading ..
Run the setup command
After running, the dialog box appears. We choose system services, which is the system service.
Now, please note that I have disabled useless system services.
Useful I recorded
Iptables (support for key routing protocols)
Network (the network must be selected. If not selected, the network cannot be connected .)
Syslog (optional)
Telnet (recommended for easy maintenance)
Xinetd (daemon, required)

Okay, press the tab key, but switch to OK.

The system service settings are complete.

The following figure shows the screen wait time for startup.
Command Format, first switch to the same as (ls is the display file and the file directory is similar to dir .)
Cd/
Then enter the boot directory
Cd boot
Then go to the grub directory
Cd grub
Edit the grub. conf file.
Use VI Editor
Vi file name (vi grub. conf)

After the vi command opens the file, it cannot be edited directly. You need to first press
Or insert into, insert edit status.
The following is the -- INSERT edit status.
-- REPLACE -- modify the editing status. The two statuses are the same as those of the word. I will not
Now we move the cursor to timeout = 10 and change 10 to 0.

After modification, We will exit and save the file
First press the esc key once and then press shift +: (colon)
Then enter the command wq (lower case) for saving and exiting)
The command to exit without saving is q! (Q + exclamation point)

OK. Now that the configuration is complete, there is another core routing code that we need to add now.

We now use remote maintenance telnet for addition and modification.

First, we need to restart the route. The restart command is the reboot command for shutdown.
Shutdown-h now

For the first time, the super administrator cannot be used for remote login and maintenance.
This is the purpose. Switch to the super administrator.
Go to the boot directory.
Then we create a new file named route.
Vi route: copy the code to the new file.

After saving the file, check again to ensure file integrity.

Okay, then we will change this route file and modify its attributes to an executable file.
Command chmod + 775 route

Okay. Let's take a look.

The command is named sh, which is completely normal,
So, in order to automatically run this file at every startup, we modify
/Etc/rc. d/rc. loca
This file
Add sh/boot/route (sh path + file name) to the last line)

This is done. If not, you should learn more about the basic knowledge.

Attach the ROUTE file I mentioned above
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.