LINUX Proxy Server route settings

Source: Internet
Author: User
Tags nameserver
LINUX Proxy Server route settings-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Route settings

1. edit/etc/sysctl. conf.
Change to net. ipv4.ip _ forward = 1
Net. ipv4.conf. default. rp_filter = 1
Kernel. sysrq = 0

2. edit/etc/sysconfig/static-route
Add a static route
Eth0 (device name) net (Network Address) 192.168.0.0 (subnet) netmask 255.255.255.0 (gateway address) gw

192.168.0.1

3. edit/etc/resolv. conf.
Nameserver 61.139.2.69 nameserver (DNS server) 202.100.4.15 (IP server address of DNS)

4. edit/etc/sysconfig/network
NETWORKING = yes
HOSTNAME = localhost. localdomain
FORWARD_IPV4 = yes
GATEWAY = 192.168.0.1 Internet GATEWAY
GATEWAYDEV = bond0 connection to the Internet Nic

5. vi/etc/rc. d/rc. local
Add echo 1>/proc/sys/net/ipv4/ip_forward
/Sbin/iptables-t nat-a postrouting-s 192.168.1.0/24-j MASQUERADE
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.