Koozali.org: home of the SME Server

2 SME Servers & Linksys Router

Adam

2 SME Servers & Linksys Router
« on: February 20, 2003, 07:11:39 AM »
Any ideas on how to set up 2 SME servers up behind a Linksys router?  I would like to have both accessible to the net from outside, but can only put one as the DMZ host on the linksys.  Any suggestions would be appreciated!!!

Thanks in advance!

Adam

Michael Smith

Re: 2 SME Servers & Linksys Router
« Reply #1 on: February 20, 2003, 07:17:38 AM »
Use the portforwarding contrib (search the forum for link) and forward the requisite ports on the Linksys to the appropriate SME server.

Adam

Re: 2 SME Servers & Linksys Router
« Reply #2 on: February 20, 2003, 07:20:45 AM »
Is there any way to open all ports for both servers?  What if I want web port 80 open on both servers?  Will this work?

Adam

James Shields

Re: 2 SME Servers & Linksys Router
« Reply #3 on: February 20, 2003, 10:46:23 AM »
Adam,

Assuming you have more than 1 external static IP provided by your ISP, then there is a fairly easy solution to your problem.

You will need to have SME 5.5 on your primary server, then you can use Abe Loveless' NAT 1:1 HowTo (in e-smith HowTo directory). This is very straightforward. However, it will not work with SME 5.6, due to the move to iptables (instead of ipchains).

Hope this helps.

James

Boris

Re: 2 SME Servers & Linksys Router
« Reply #4 on: February 20, 2003, 11:56:30 AM »
If you have only one public IP from your ISP you can not forward lets say port 80 from public IP to both internal servers. Where are couple of ways around it.
First you can use port 80 for one server and forward it to port 80 on the first internal server. Then use port 81 and forward it to port 80 on the second server. You will have to use url redirection (offered by zoneedit) for it to be transparent for the visitors.
Second option will only work on SME 5.1.2 for now. You can forward everything from the router to the first server and then use ProxyPass add-on to redirect some URLs to the second internal server.
To have full featured multiserver network you will need to get separate IPs for each public server and more advanced router "IPCop" will do as it supports multiple IPs on the interface. FloppyFirewall will work (with a lot of tweaking).

Franklin S. Werren

Re: 2 SME Servers & Linksys Router
« Reply #5 on: February 20, 2003, 04:38:51 PM »
Another method is to set Apache to port 8080 and foreward
that port to the second server. Remember a Linksys router is
a NAT router that uses non-routable IP addresses on the LAN
side. I use them all the time because of their hardware "Firewall"
that is built in. And I have used it also to forward ports to
an internal server for e-mail and web.

Bill Talcott

Re: 2 SME Servers & Linksys Router
« Reply #6 on: February 20, 2003, 06:31:45 PM »
Adam wrote:
>
> Is there any way to open all ports for both servers?  What if
> I want web port 80 open on both servers?  Will this work?

Assuming you only have one public IP address, you can't make its port 80 point to both servers. It's just not possible. You can have the public port 80 forwarded to port 80 on one server, and public port 81 (or something else) pointed to port 80 on another server. But you can't have one port forwarded to two different things, as it just wouldn't have any idea where it was supposed to forward the data.

Adam

Re: 2 SME Servers & Linksys Router
« Reply #7 on: February 21, 2003, 06:50:40 AM »
Guys, Thanks a TON for all of your replies.  You all have been extremely helpful and I appreciate every bit of it.  

I am still learning, so please be patient w/me :)

--Adam

Kelvin

Re: 2 SME Servers & Linksys Router
« Reply #8 on: February 21, 2003, 12:35:51 PM »
Adam,

You could try this (note : it might not work for all services / ports, just the common names).

It might be possible, though I've not tested this to make use of one SME server to redirect to the second. :-

Internet
to
Linksys
to
SME#1
to
SME#2

Say you have 2 domains registered and pointing to the same public IP address, called mydomain1.com and mydomain2.com.

Again, I stress I've not tried this myself and have not really thought this in depth (I'm firing from the hip :-) ).

Set SME#1's primary domain to mydomain1.com and a virtual domain mydomain2.com, then set SME#2's primary domain to mydomain2.com. Then in hostnames and addresses of SME#1, point the www entry of the virtual domain mydomain2.com to the internal IP address of SME#2. Repeat for the other common hostname entries (like mail, ftp, etc).

Just a thought.

Kelvin

Adam

Re: 2 SME Servers & Linksys Router
« Reply #9 on: February 21, 2003, 05:34:06 PM »
Would I need to change the port that apache is set up on box #2?  If so, How would I do this?

I have set up port 80 to forward to box #1 & port 81 to forward to box #2.  In ZoneEdit, i set up domain2.com to forward to domain1.com:81  

Let me know what you think.

--Adam

Boris

Re: 2 SME Servers & Linksys Router
« Reply #10 on: February 21, 2003, 10:07:00 PM »
This should work. Forward port 81 from your router to port 80 on server2 and configure domain2 on it.

Kelvin

Re: 2 SME Servers & Linksys Router
« Reply #11 on: February 22, 2003, 12:43:32 AM »
If you are getting SME#1 to forward to SME#2, you should not need to change port numbers.

Kelvin

Graham Harris

Re: 2 SME Servers & Linksys Router
« Reply #12 on: February 22, 2003, 01:22:50 AM »
Adam,

Why do you need two SME servers?

You may not be aware of some of the feature built in to SME.

It really would suprise me if you do need two, though of course you may.

Graham

James Shields

Re: 2 SME Servers & Linksys Router
« Reply #13 on: February 22, 2003, 01:54:39 AM »
Graham,

Maybe he is using two SME servers for exactly the same reason I do.

My primary server is a production server, hosting multiple domains.
My second server is a test server for trying out changes, additions, etc. to make sure they are going to work and not crash the production server.

James

Graham Harris

Re: 2 SME Servers & Linksys Router
« Reply #14 on: February 22, 2003, 02:17:04 PM »
James,

Yeh, I have 2 * 5.6 as well.

I have one IP and I talk to both from outside but there are so many ways this can be achieved we need more info to help.  In addition I was trying to ascertain whether he really NEEDS two servers, ie maybe he is a newbie who just wants to run two website and mistakenly thinks he needs two servers (just an example).

Adam, a bit more info would be helpful, you say..

"I would like to have both accessible to the net from outside..."

What services?