Author Topic: Zentyal having 2 websites responding to port 80  (Read 1249 times)

LMSSML

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Zentyal having 2 websites responding to port 80
« on: December 14, 2014, 09:54:06 am »
HI there,

I got two websites responding on different port (8080 and 80)
Although I got for external access putting the websites responding on port 80 I got the following connection scheme

Internet -----> Router (static ip)  -------> zentyal --------> LAN

I made a port forward and it works ok with one website but the other one does not work even doing another port forward.

port forward
1.1.1.1  8080 1.1.1.2 80

Is there a way to turn around this situation ?
Anyone got this problem ?

I saw something using SNAT is it possible ?

LMSSML

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: Zentyal having 2 websites responding to port 80
« Reply #1 on: December 15, 2014, 10:34:36 am »
Is there anyway of solving this problem

I forgot to say that I only have one public ip address

robb

  • Guest
Re: Zentyal having 2 websites responding to port 80
« Reply #2 on: December 15, 2014, 03:55:40 pm »
Some more details are needed here.
What version of Zentyal do you use?
How do you host the websites? (On Zentyal? on what httpd)
Are 1.1.1.1 and 1.1.1.2 pointing to the webserver?
What is/are the subnet(s) you use on your LAN?

LMSSML

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: Zentyal having 2 websites responding to port 80
« Reply #3 on: December 15, 2014, 07:10:43 pm »
Hi there,

The version of zentyal is 3.3
The websites are hosting by iis.
The port forward points to the web server, so here is the problem.

One public IP
Two websites  using different ports on is (80 /8080)
Port forward using 1.1.1.1 80 1.1.1.2 80
Port forward using 1.1.1.1 80 1.1.1.2 8080

Although I got the same ip under iis  with different ports but what i really need it's from external (internet ) call the two websites on port 80 and they can resolve one for port 80 and the other one for port 8080.

For example.

www.123.com
test.123.com


robb

  • Guest
Re: Zentyal having 2 websites responding to port 80
« Reply #4 on: December 15, 2014, 08:01:28 pm »
Why don't you use name based virtual hosts instead of ip based virtual hosts? I am not familiar with IIS, but i think it should be possible (like in Apache) to create virtual hosts, and define on what port to connect.
« Last Edit: December 15, 2014, 08:03:33 pm by robb »

LMSSML

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: Zentyal having 2 websites responding to port 80
« Reply #5 on: December 16, 2014, 10:04:03 am »
Hi there,

Thanks for the answer.

If I used virtual hosts using iis i got the same problem.
If I understood your ideia using the virtual hosts could apply on zentyal firewall for names and ports?
Then I could redirect the ports by name is this that you intended to do ?



Is this correct ?


robb

  • Guest
Re: Zentyal having 2 websites responding to port 80
« Reply #6 on: December 16, 2014, 05:27:24 pm »
You just need to forward those ports to the webserver. On the webserver you direct the request for a specific website to the correct domain hosted on the webserver.
I don't know if the diffenrence in ports is mandatiry or just a way to make 2 websites available? If it is the latter, you don't need to have 2 different ports: both websites will be reachable fine if you use namebased resolution.