Need to access Centos 7 from two public IP's

Issues related to configuring your network
Post Reply
isuruzjay
Posts: 2
Joined: 2017/08/28 09:55:05

Need to access Centos 7 from two public IP's

Post by isuruzjay » 2017/08/28 10:19:15

Hi i have configured Centos 7 server which have 4 nic's.

My requirement is to access the Centos 7 server from separate 2 LAN networks internally and from outside using their public IP's.

Can someone please advice me how to do the configuration.

Thanks in advance :)

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Need to access Centos 7 from two public IP's

Post by tunk » 2017/08/28 10:50:13

What's the current config of the four NICs?
What do you mean by access; ssh, http ...?

isuruzjay
Posts: 2
Joined: 2017/08/28 09:55:05

Re: Need to access Centos 7 from two public IP's

Post by isuruzjay » 2017/08/28 18:57:24

tunk wrote:What's the current config of the four NICs?
What do you mean by access; ssh, http ...?
no any configuration, i need full access :geek:

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Need to access Centos 7 from two public IP's

Post by jlehtone » 2017/08/29 07:03:06

There is always a configuration. At least a default config. (You wrote: "i have configured Centos 7 server".)

Exception: a brand new machine that has never been powered on and nothing at all has ever been written on its drives. That is a "no configuration" (except that its firmware -- BIOS or UEFI -- does have some default config).

The default configuration does allow ssh access via every interface.


You do mention 4 nics and 3 subnets. However, you did not tell which (if any) are link-local.

evantkh
Posts: 9
Joined: 2017/08/23 15:03:41

Re: Need to access Centos 7 from two public IP's

Post by evantkh » 2017/08/30 13:57:06

You can add matching rules to different routing tables with different default routes for each source IP address.

I think you may be able to do this with ip command.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Need to access Centos 7 from two public IP's

Post by jlehtone » 2017/08/31 11:10:55

evantkh wrote:You can add matching rules to different routing tables with different default routes for each source IP address.
Routing and netfilter are intertwined features, but until the OP provides more data we don't know what is actually needed.

Routing decides whose problem a packet is.
Netfilter can shovel the packet into a tarpit.
tcpwrappers can block the packet from reaching a listening service.
Selinux can deny a service from listening a port.
A service can simply not listen an interface.

Yes, utility programs can modify active configuration. One should prefer to create permanent configurations that are (re)applied on (every) boot.

Post Reply