Virtualmin and router. How configure

Hello Everybody.

Please i need help urgent.

I am creating a hosting web or web server for my web page.

I have installed Centos 6 and virtualmin. Virtualmin say that my ip is and i created a host with domain and local run good.

But i need intro to tthe web from another machine or pc. I have a router tp link but i dont know how do for configure the router.

Please im newby and need to know how configure this.

Thank you.

You need to configure port forwarding in your router to the server IP, for all relevant ports (80, 25, 53 UDP, 110, 443, 995 and so on).

But there’s more to getting hosting behind a NAT router to work than forwarding ports. Setting up DNS properly is the biggest challenge. I think there’s a page with instructions about this somewhere on this website, Eric surely knows the link which I don’t. :slight_smile:


Thank you.

im tired. Im try and try but dont understand good.

i have installed and configured the virtualmin basic. But i cant configure my router and some options intro virtualmin for make my web server.

Please if you have a tutorial or manual or something that can help me to configure the webserver.

Thank you


Unfortunately, we won’t be able to help with your router configuration since each router is different. The key there is that you would need to configure the port forwarding for all the ports Locutus mentioned… your router should have documentation on how to do that.

After performing all the port forwarding, if things still aren’t working, what problem are you having exactly?

Note though that since you’re using NAT, you’d need to go into System Settings -> Virtualmin Config -> Network Settings, and in there, set “Default IP address for DNS records” to “Same as virtual server IP”.

That’s only a small piece of the puzzle though – if things aren’t working for you, you’ll have to give us lots of details about what isn’t working, what symptoms you’re seeing, any errors you’re getting, and what you’ve tried so far in order to resolve it.



Thank you for your help.

My problem is i dont know how configure virtualmin for see the web in internet. If you can talk me about few ticks of how configure the virtualmin i apreciate this.

After i will see how configure the router. but i need configure first the virtualmin perfectly.

Thank you for your help and excuse my english


Did you perform the step I described above, going into System Settings -> Virtualmin Config -> Network Settings, and in there, set “Default IP address for DNS records” to “Same as virtual server IP”?

That’s the only step you should have to perform in Virtualmin.

If you’ve performed that step – can you describe what problem you’re having specifically?

Typically, a new server has Internet access… under most circumstances, you shouldn’t have to perform any steps to get Virtualmin to see the Internet.

Please describe what symptoms you’re seeing though, including any errors you’re receiving – that’ll enable us to provide the best help.


@mamb: In addition to what Eric said (we need more detailed problem descriptions!), what exactly do you mean with “see the web in internet”? Do you mean accessing the server from the outside, or providing internet access for the server? In both cases, please describe precisely what you tried and what did not work.

Hello again.

I have a router Tp Link TL-WR741ND and i configure forward ports 25, 443, 80, 110 with ip internal and external ip is

I enable DMZ with ip internal and disable firewall router and firewall centos.

In an another cpanel i put the domain and and both point register A to

But i cant intro from internet to web. I can view in local with the domain but i cant view the web from another computer.

Please can you help me?


The hostname resolves correctly, but connect to port 80 on the IP is not working.

In your first post you said Virtualmin detected the IP, but in your most recent one you said you forwarded to IP in your router. You might want to make sure there’s no discrepany (i.e. Virtualmin is configured properly and what is the correct IP for your server).

Then double-check if the port forwarding to your server is correct. Also make sure Apache is running and listening on port 80 using netstat -tpln | grep :80

Hello Thank you. Its correct about my first post. but i that momment i didi install centos in virtualbox and now install into a server (machine).

The ip is the modem ip this can’t configure in router to open ports i configure the internal ip.

I run the code

netstat -tpln | grep :80

and the answer is

tcp 0 0 :::80 :::* LISTEN 2495/httpd

What its this?

Thank you for your help


That “netstat” command shows that Apache is correctly listening.

What output do you receive if you run this command on your Virtualmin server:

ping -c 3

That’ll determine if your system is able to communicate with systems on the Internet, which will rule out a networking issue.


Hello eric.

show this:

PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=53 time=136 ms
64 bytes from ( icmp_seq=2 ttl=53 time=131 ms
64 bytes from ( icmp_seq=3 ttl=53 time=131 ms ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2134ms
rtt min/avg/max/mdev = 131.556/133.231/136.325/2.210 ms

too i check other configurations in vitualmin.


0000::1 type master zone (domain) and master

and other question that 2495/httpd. i need open the port 2495 in router??


No, the 2495 is the process ID, not a port number.

Still, connect from the outside to your port 80 is not successful. So either the port forwarding in your router is not configured correctly, or some external or internal firewall is blocking access.

The latter you can check with iptables -L on your server. The former you need to check in your router’s config web interface, or with your internet service provider. The hosts that appear in the route to your IP (notably followed by four hosts that don’t reply to traceroute), would suggest that some anonymizer or similar service is involved, which might block external access to your system.

Hello. the answer to iptables -L

Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:ftp-data ACCEPT udp -- anywhere anywhere udp dpt:ftp ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:dnp ACCEPT tcp -- anywhere anywhere tcp dpt:ndmp ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:imaps ACCEPT tcp -- anywhere anywhere tcp dpt:imap ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:submission ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ACCEPT tcp -- anywhere anywhere tcp dpt:ssh

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

The COMPANIA-ANONIMA… is my Provider Internet.

Hello i scan the ip to know open ports but any port is open.

I will tell my internet provider for ask about this.


Yeah, your Virtualmin server isn’t blocking any ports… which leads me to believe that either your router, or your ISP, is the cause of the problem.

It certainly can’t hurt to talk to your ISP/provider, to see what they have to say about the issue. Some ISP’s do block incoming ports.