-1

I'm doing a big mess, maybe is a concept understanding of how network works, but here's my problem.

I've to make a setup to a CentOS server as a Firewall and Squid (already configured) to substitute a Windows gateway, and new server have 2 NICs with the following NIC and routing configuration:

**NIC eno1/IP 200 will be my output to Internet; **NIC ifcfg-enp0s20f0/IP 210 will receive my internal traffic; **IP 14 is my actual gateway server to be substuted.

ip route list

default via 192.168.1.200 dev ifcfg-enp0s20f0 proto static metric 100

default via 192.168.1.14 dev eno1 proto static metric 101

192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.200 metric 100

192.168.1.0/24 dev ifcfg-enp0s20f0 proto kernel scope link src 192.168.1.210 metric 101

192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

By some reason I don't understand why:

  • With this configuration, I can't even ping google.com;
  • If I add deault gateway as "route add default gw 192.168.1.14", the ping from my server works;
  • How to change the Metric value;
  • From a Windows machine, with route changed from gw IP 14 to IP 200/210, I can't reach the Internet.

If I'm not clear please tell me, and thank you so much for answers.

B.

0

Got an answer!

  • Added GATEWAY=192.168.1.14 in my Internet NIC (IP 200);
  • Removed GATEWAY line from my internal NIC (IP 210);

At this point, my internal IP 210 was getting a default gateway by itself; it was set in /etc/sysconfig/network, so I removed GATEWAY from this file and my routing was:

# ip route list

default via 192.168.1.14 dev eno1 proto static metric 100

192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.200 metric 100

192.168.1.0/24 dev ifcfg-enp0s20f0 proto kernel scope link src 192.168.1.210 metric 101

192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

Done! Thank you!

B.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.