Alternative IP Addresses

Home » CentOS » Alternative IP Addresses
CentOS 8 Comments

My CentOS-7 home server has a static IP address.

Is there a simple way of organizing the hpptd server so that it is accessible through this address at a remote host, but is accessed at its 192.168 address by a laptop on the WiFi LAN?

8 thoughts on - Alternative IP Addresses

  • Is the static IP address that you mention public or private?

    You could use Limit statements in apache or iptables firewalling to do this.


  • are you also running your own DNS at home? is this httpd server ‘dual homed’ and have a NIC on both the internet side and your local LAN ?

    you could run split DNS, so on your LAN, is 192.168.x.x while on the internet, is the actual IP address.

  • John R Pierce wrote:

    I’m not running my own DNS server, and would prefer not to.

    I’m not quite sure what “dual-homed” means. The machine on which httpd runs has a fixed IP address. Is there any way this machine could be accessed on the local LAN
    through this IP address, rather than 192.168… ?

    I’d rather not run a DNS server on my machine. I tried this some years ago, and ran into trouble.

  • Barry Brimer wrote:

    It is a public IP address.

    I guess there could be a way of organizing what I want through shorewall, which I am running on my home server?

  • Why not put 192.168.whatever in your /etc/hosts file? No need to run a dns server to hard-code one single lookup like that.

  • Frank Cox wrote:

    Thanks very much, that seems to work. I added “” to the line starting

  • My home firewall (pfsense) runs a local DNS caching resolver (unbound), and I can add IP-name overrides to it via the web UI… I dislike putting stuff in /etc/hosts as its so ‘out of sight, out of mind’