Community discussions

MikroTik App
 
Sheldonl
just joined
Topic Author
Posts: 4
Joined: Sat Sep 17, 2011 10:02 am

1 ext IP Address, multiple domains to multiple servers

Sat Sep 17, 2011 10:12 am

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
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

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

Sat Sep 17, 2011 6:44 pm

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.
 
Sheldonl
just joined
Topic Author
Posts: 4
Joined: Sat Sep 17, 2011 10:02 am

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

Sat Sep 17, 2011 10:13 pm

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.
 
pedja
Long time Member
Long time Member
Posts: 694
Joined: Sat Feb 26, 2005 5:37 am

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

Thu Sep 22, 2011 10:55 am

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.
 
Sheldonl
just joined
Topic Author
Posts: 4
Joined: Sat Sep 17, 2011 10:02 am

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

Thu Sep 22, 2011 10:58 am

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.
 
pedja
Long time Member
Long time Member
Posts: 694
Joined: Sat Feb 26, 2005 5:37 am

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

Thu Sep 22, 2011 11:15 am

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.
 
DrHerTz
just joined
Posts: 14
Joined: Wed Sep 21, 2011 5:49 am

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

Thu Sep 22, 2011 3:13 pm

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: