How do I setup routing table after using static networking?

Hi,

it might be a silly question, and I think the correct answer is to forwarding all data to gateway, right?

The problem is…how do I find the gateway IP for static networking?

I followed the static networking configuration tutorial, but what it's using is the gateway for public IPs. In my setup, I disabled the public IP and use static IP only so the internal DB server won't have to worry about the public internet, but it still needs to talk to public internet when running something like "yum update" or installing some tools. Since I disabled the public IP, it's impossible to use the public gateway for routing purpose.

Any hint? Thanks.

btw, the output from netstat is:

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

192.168.128.0 0.0.0.0 255.255.128.0 U 0 0 0 eth0

3 Replies

There is no default gateway for the RFC 1918 space. You need a publicly routable IP address if you're going to route to the public IP network.

I see 2 main options:

1. bring up the public IP whenever you need it for patching, etc (script bringing it up and down)

2. just leave the public IP up, firewall everything inbound and have the DB server only bind to the private IP

@glg:

2. just leave the public IP up, firewall everything inbound and have the DB server only bind to the private IP
This is probably the best and easiest to manage setup.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct