• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Hosting behind NAT

M

mroy

Guest
Is it possible to put my Plesk server behind a NAT and be able to host domains correctly? If I setup multiple domains on the same IP will it work? In the DNS I would setup the external IP address of my router and put the DMZ on the Plesk Server. But since the IP of the Plesk server would be in the 192.168.*.* range I'm wondering if it would resolve multiple domains correctly...

I did the test with a dedicated domain on one IP inside the NAT that work but the DNS was not hosted on the Plesk server. But now to configure multiple domains on the same internal IP I'm not sure it will work correctly...

Anyone was able to configure it correctly? Because I don't want to configure the DNS on my Plesk server and then once I transfer the domains on that server to figure it doesn't work...

Thanks
 
I have the same question as well. I currently have the plesk box behind a router.

I don't see why it wouldn't work, trying to access the plesk via another computer on the lan.

I get a page not found error.
 
It works fine "out of the box". as it were.

There's no reason for you not to be able to get to https://192.168.0.100:8443 (if that is the address of your local Plesk server) to get to the admin panel.

You will also be able to go to http://192.168.0.100 and see the default Plesk holding page.

All this assumes the computer you are tyring to connect to the Plesk box from is also on the 192.168.0.x subnet of course.

And by forwarding port 80 (and others, as required) from your router to your Plesk box, you will also be able to use it to serve websites to the outside world.

If you cannot see the plesk box from your internal network, try running an X session on the Plesk box and use mozilla or whatever to go to https://localhost:8443 and if that works try https://192.168.0.100:8443

If neither works then either you have a firewall or networking problem, or plesk isn't actually running. A quick and dirty way of finding out without looking through lines of data is to do a service psa stopall followed by a service psa start

Also check ps -ax to make sure you have http and httpsd runing.

Faris.
 
Also, if you are going to put it behind a router, at least set the server for a hard coded IP, not setup for DHCP, otherwise your port forwards may end up going to other than the server, since with DHCP there is no guarantee that the server will always have the same IP....
 
If you can't reach your domains from the internal network it is probably a routing problem. The router/firewall performing NAT works well with inbound requests from the Internet, but it doesn't do well when it has to fulfill a request from the trusted (internal) network, out the untrusted network (external) interface, then back inside to the trusted network.

If the internal network has DNS (not the Plesk DNS), create records for your Plesk server that reflect the private network address of the Plesk server, or update all the client computer's hosts files to do the same. So when an internal client requests the Plesk web sites or Plesk server, the DNS resolution provides the internal IP address, not the public IP address.

Another solution is to add a router so the client computers and Plesk server are not on the same routed segment. Routing will work fine and DNS or edited host files won't be needed.
 
I run all my servers in a DMZ using NAT.

You have to assign both the internal IP address (of the DMZ) and the external DNS (internet) IP to a domain. This way Apache will respond to the request that comes from the firewall as the internal IP. BUT, you have to default the DNS settings of the domain to the external IP.

You will have to setup the additional External IP in the IP settings for the server in PSA then add it to the pool for sites to use. BUT, if your using RH, I have found that you need to delete the sub-interface config file in the /etc/sysconfig/network-scripts dir, otherwise nothing will work (you don't need it because Bind is the only thing that uses the external IP for when it sends out DNS updates).

Of course, you will need to alias the IPs on your firewall and forward the ports. The only ones I forward are 53 (udp/tcp), 80, 8443, 21, 22, 25, and 110.
 
Back
Top