Centos 7 map private IP address to public ip address

NicH1

New member
Joined
Sep 8, 2022
Messages
2
Hi There Please can you assist me in how to map a private IP address to a public IP address as I am trying to setup a web server on centos 7 with CPanel and WHM, but when I use the dig command it keeps coming back with connection timed out; no servers could be reached

Cpanel said that its due to NAT not being configured correctly and on a 1:1 environment

How do I solve this
 
Apart being a directadmin forum, its still unclear to me if you want your local LAN IP being able to access the cpanel/directadmin installation on a server with an external WAN IP, or if you want to setup the server on your LAN IP, and make i accessible via WAN IP. Depending on that, you must configure portforwarding in your local router.
 
Firstly, make sure you're using the correct command for your setup. For CentOS 7, the command to map a private IP to a public IP is usually "iptables".
 
As far as I know, the commonly used method in CentOS 7 to associate a private IP with a public IP is through the "iptables" command. You can also check your network settings and make sure NAT is enabled and configured correctly. Keep in mind that with the recent announcement of centos 7 eol reaching its end of life (EOL), you may want to consider upgrading to a newer version of CentOS or a different distribution of Linux. Upgrading could solve your issue and give you better support in the long run. If you're still having trouble, there are a lot of online resources and forums where you can ask for help.
 
Back
Top