Linux configuration 2 or more than 2 public network IP

Source: Internet
Author: User
In the work occasionally encountered in 1 machines configured 2 or more than 2 of the same network segment of the public network IP;
In the actual configuration process found that when the configuration of multiple public IP network segment, only one public network IP is pass;
Reasons for this: reverse route checking is enabled by default on Linux

If 2 network cards are inside a LAN, then the server may find the gateway from eth0 or eth1, if a packet from eth0 into the gateway on eth1, then from the eth1 is out of the way, it will not pass. The reverse route check asks where it came from to go back.

Workaround: turn off reverse route checking

echo 0 >/proc/sys/net/ipv4/conf/eth1/rp_filter
echo 0 >/proc/sys/net/ipv4/conf/eth2/rp_filter
Note: Eth1,eth2 for my side configuration of public IP network card, need to be configured according to their own situation

Write/etc/rc.local, set power on automatically turn off reverse route check

Linux configuration 2 or more than 2 public network IP

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.