how to configure Virtualmin web hosting server behind NAT

hi all;

I’ve installed CentOS 5.5 and virtualmin GPL.This server is behind NAT…Server’s non-official IP address is “” and my adsl modem official IP address is “88...***” . And I ve a registered domain name also…For example I changed my domain settings on just like that ; Name Server settings are , and their IP addresses are my adsl modem official IP address…

after that , I ve set my CentOS hostname is nx1. FQDN is

Do you help me about how to start to set my virtualmin clearly step by step…I think, first of all I have to set my…after that I want to host my friend’s domain name here…

thank you so much for your helps…

It sounds like you’re doing pretty good so far :slight_smile:

Since you’re using NAT, you’ll want to go into System Settings -> Module Config -> Network Settings, and make sure you set “Default IP address for DNS records” to use your external IP address rather than the internal address.

From there, if your nameservers are setup, the next step is to just start adding your domain into Virtualmin – you can do that using the “Create Virtual Server” link at the top-left. Go into there, enter the domain name to use, and Virtualmin will create the domain in Apache, setup the DNS, create databases if you tell it so, and so forth.


If your nat-ed router have a dmz setting I suggest to put internal server ip on that, but not before you enable iptables on centos.

so sorry for delay

so what about virtual server IP addresses ? right now I ve two domain in virtualmin and they work clearly without virtual IP addresses for each virtual server… Do I need use virtual IP address for each virtual servers ? I think it will be a problem while NAT…because the Adsl router cannot perform to send http or https request to virtual servers beacuse of one IP address can be set at the same time on the router…

my NAT settings at the moment :

Internal IP (virtualmin_eth0) :
Internal port : 80 or 443
External IP : 88.x.x.x
External port : 80 or 443

I would want to have virtual Ip address for each virtual servers ;

eth0:1 =

eth0:2 =

acccorging to these settings , how to perform virtualmin network configuration ?

should I use still same settings on adsl router or change NAT settings fro every virtaul IP address ? I m confused :S

Hi andreychek;

Could you please help me about this topic ?

thank you so much