Page 1 of 1

1 ext IP Address, multiple domains to multiple servers

Posted: Sat Sep 17, 2011 10:12 am
by Sheldonl
Hi,

I am running ROS 5.5, What I want to acheivce is set up so that with differnt sub domains, route to different internal servers on the same port.
Eg;

windows.domain.com -> mikrotik -> 192.128.1.xx IIS
linux.domain.com -> mikrotik -> 192.168.1.yy *nix server.

I am new to RouterOS so if you can provide a beginnnners step by step :)

Thanks

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Sat Sep 17, 2011 6:44 pm
by fewi
You can only do that via the proxy - you can't actually port forward based on the domain name in an HTTP request because port forwarding is destination NAT. NAT has to happen on the first packet of a connection. HTTP is TCP, so the first packet is a simple SYN - you don't know the HTTP header yet in that packet.

To make this transparent to the user you'd have to run an open proxy that at least proxies all the servers behind it. Not a very good solution, which is why I'm not typing out step by step solutions yet. If you wanted to do this you'd probably not use RouterOS as a proxy but rather do this on IIS or Apache, where you port forward all tcp/80 traffic to a proper proxy and take it from there.

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Sat Sep 17, 2011 10:13 pm
by Sheldonl
Hi,

That's I was thinking that you would say that. I briefly looked in to Porxing on apache ( the default port 80 ) last night.
As the traffic will be so limited to the windows box, and these servers are only our local development + client 'checking/testing' a proxy will probably the best option.

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Thu Sep 22, 2011 10:55 am
by pedja
Why it is nededd to have then on the same port? If it is for internal use then it should be no issue if sites use different ports.

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Thu Sep 22, 2011 10:58 am
by Sheldonl
Why it is nededd to have then on the same port? If it is for internal use then it should be no issue if sites use different ports.
I need external access to each server. Yes, Internal is fine.

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Thu Sep 22, 2011 11:15 am
by pedja
No, buy "internal use" i meant it is service for known users that can handle putting port in site address, or can learn how to do it.

Yes, addresses would be a bit ugly bit it is easy tio setup. It is better than what you asked which is close to impossible to do.

Re: 1 ext IP Address, multiple domains to multiple servers

Posted: Thu Sep 22, 2011 3:13 pm
by DrHerTz
You can only do that via the proxy - you can't actually port forward based on the domain name in an HTTP request because port forwarding is destination NAT. NAT has to happen on the first packet of a connection. HTTP is TCP, so the first packet is a simple SYN - you don't know the HTTP header yet in that packet.

To make this transparent to the user you'd have to run an open proxy that at least proxies all the servers behind it. Not a very good solution, which is why I'm not typing out step by step solutions yet. If you wanted to do this you'd probably not use RouterOS as a proxy but rather do this on IIS or Apache, where you port forward all tcp/80 traffic to a proper proxy and take it from there.


hello fewi

can i add your YM or MSN please ????
I Need help :cry: