Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Is it possible to have 2 public IP addresses with 2 NICs and static route on CentOS 6.6?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Is it possible to have 2 public IP addresses with 2 NICs and static route on CentOS 6.6?

comXyzcomXyz Member
edited October 2015 in Help

Hi guys,

I want to setup 2 public IP addresses (different subnet) with 2 NIC on CentOS 6.6.

For the first IP to connect to the internet, I need to set static route:

gateway dev eth0

default via gateway dev eth0

The second IP is from different subnet, but it uses the same gateway with first IP

What config I need to setup to have the second IP connect to the internet, so I can connect to the server using SSH via the second IP?

Thanks.

Comments

  • @comXyz said:
    Hi guys,

    I want to setup 2 public IP addresses (different subnet) with 2 NIC on CentOS 6.6.

    For the first IP to connect to the internet, I need to set static route:

    gateway dev eth0

    default via gateway dev eth0

    The second IP is from different subnet, but it uses the same gateway with first IP

    What config I need to setup to have the second IP connect to the internet, so I can connect to the server using SSH via the second IP?

    Thanks.

    Tried to do it the cheap way on delimiter?
    Yea I tried that and failed and decided just to get a /29 instead.
    but I do remember someone was successful in doing it try searching around for it it was probably one I commented in.

  • @timnboys it's not Delimiter. I can't find the topic you mentioned, is it on LET also?

  • after setting both IP, run this command

    sysctl net.ipv4.conf.all.rp_filter=2
    
    Thanked by 1comXyz
  • @tommy said:
    after setting both IP, run this command

    > sysctl net.ipv4.conf.all.rp_filter=2
    > 

    Thanks, it works.

  • @comXyz said:
    Thanks, it works.

    Thanked by 1linuxthefish
Sign In or Register to comment.