Problem with IP public and private on two different network adapters

Issues related to configuring your network
Post Reply
lorenzo_kadv
Posts: 1
Joined: 2019/05/23 21:46:50

Problem with IP public and private on two different network adapters

Post by lorenzo_kadv » 2019/05/23 22:00:16

Hello,

I read different posts, also in this forum, but I still have some problems...

I have a server with two network adapters:
- ens192 with different public IPs
- ens256 with one private IP

The firewall is disabled.

If I tried a command like this:
# ping -I <pubblic IP> rabbitmq01
PING rabbitmq01 (192.168.60.30) from <pubblic IP> : 56(84) bytes of data.


instead:
# ping -c 1 -I 185.241.92.198 gmail.com
PING gmail.com (172.217.23.101) from 185.241.92.198 : 56(84) bytes of data.
64 bytes from mil04s23-in-f5.1e100.net (172.217.23.101): icmp_seq=1 ttl=55 time=3.17 ms

--- gmail.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.176/3.176/3.176/0.000 ms


So, in the first case, no pings are visible.

In any case, I see this error in the MTA log trying to connect the Gmail MX and others with a public IP: Unable to connect: no response

Do you have any idea? Can I send you all the information you need to try to help me?

Regards,
Lorenzo

User avatar
TrevorH
Forum Moderator
Posts: 26915
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem with IP public and private on two different network adapters

Post by TrevorH » 2019/05/23 22:10:34

Your default route is wrong. If you look at /etc/sysconfig/network-scripts/icfg-$interface for both of them, make sure that only one of them contains GATEWAY= and remove it from the other.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Networking Support”