Experience Ubuntu as a server

Source: Internet
Author: User
Experience Ubuntu server-Linux Enterprise Application-Linux server application information. The following is a detailed description. There are several machines, hoping to use one of them as the server and provide routing and sharing services for other machines. to ensure stability and security, choose linux as the server system, ubuntu is a very easy-to-use Linux release, which I will use.

Hardware
First of all, there must be a machine that can install Ubuntu (not all new machines can be installed), and there are two NICs as gateways for two network segments.

Install configurations
Install Ubuntu7.04 directly. The installation was successful and soon completed. Then configure the network and set the network adapter eth0 to 192.168.1.234, because the original network segment is 192.168.1.0/24, and the other network adapter eth1 is configured as the gateway 192.168.2.1 with the network segment 192.168.2.0/24, in this way, all other machines are clients in the LAN 192.168.2.0/24.

Use the route-n command to view the route table information:

Kernel IP route table
Target gateway subnet mask flag hop reference Interface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

One is the gateway of 192.168.1.0/24, the other is the gateway of 192.168.2.0/24, the other is the loop, and the last is the default route.

Next, IP Forwarding. In many documents, use the following command to enable I forwarding:

Sudo echo "1">/proc/sys/net/ipv4/ip_forward

But I don't know why I always say I have no operation permission in Ubuntu, so I have to look for another path:

Modify/etc/sysctl. conf and add:

Net. ipv4.ip _ forward = 1

Also added:
Net. ipv4.tcp _ syncookies = 1
Net. ipv4.icmp _ echo_ignore_broadcasts = 1

This configuration sets system parameters when the system starts, so that IP Forwarding is complete.

The firewall management tool FireStarter is installed, but the following error occurs when it is started:

The device eth0 is not ready

An error occurred while starting. Run the following command:

Udo sed-I ~ "S/\/sbin \/ifconfig/env LANG = en_US \/sbin \/ifconfig/g"/etc/firestarter. sh
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.