need help/advice on gateway server to redirect traffic for http/smpt/pop3
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
need help/advice on gateway server to redirect traffic for http/smpt/pop3
Hi everyone,
I have been beating my head for the last few weeks on this problem, (although I have been taking the wrong approach, it seems).
I need a gateway to direct web traffic to three separate servers/domains. I have been trying to do this with both a dns server and , (seperatly), apache server to forward requests. The dns server was a no go, and <i can only get apache to redirect http and ftp.
After Googling this ALOT, I believe that what I need is a gateway server to redirect my traffic to the 3 different servers. I have been reading about using using nat and iptables for this and was wondering if anyone had any advice/suggestions on this. The other thought I had was to use something like pfSense to create the gateway, but I am still reading the documentation, and I am unsure if this approach will work.
Any thoughts, suggestions ect. would be highly appreciated.
I don't see why you couldn't use nat and iptables for this. What issues are you running into exactly and what makes you believe this can't be done via iptables? How is your network laid out?
The reason I am unsure is that I would need to redirect A LOT pf ports. What I have read is that iptables won't allow 2 machines to use the same port, (http can be port 80 for one machine, but not for two). Here is an excerpt of my iptables rules:
As you can see, it would be a lot of work to reconfigure each server to use a different port for each service. As I am using qmail, I am not sure if it can be done for all of the services that I need without causing problems.
What I was hoping for was something that would be some what "seamless", that could just redirect the traffic without requiring 20 different services to be reconfigured.
I have been beating my head for the last few weeks on this problem, (although I have been taking the wrong approach, it seems).
I need a gateway to direct web traffic to three separate servers/domains. I have been trying to do this with both a dns server and , (seperatly), apache server to forward requests. The dns server was a no go, and <i can only get apache to redirect http and ftp.
After Googling this ALOT, I believe that what I need is a gateway server to redirect my traffic to the 3 different servers. I have been reading about using using nat and iptables for this and was wondering if anyone had any advice/suggestions on this. The other thought I had was to use something like pfSense to create the gateway, but I am still reading the documentation, and I am unsure if this approach will work.
Any thoughts, suggestions ect. would be highly appreciated.
Thanks
zog
I may be missing something, but it is not clear exactly what you are trying to achieve. I am right when I say the following:
You have 3 servers sitting behind some sort of gateway/firewall and you want each server to serve HTTP, SMTP and POP3 for a different distinct domain. Do you only have a single public IP address or do you have several?
I may be missing something, but it is not clear exactly what you are trying to achieve. I am right when I say the following:
You have 3 servers sitting behind some sort of gateway/firewall and you want each server to serve HTTP, SMTP and POP3 for a different distinct domain. Do you only have a single public IP address or do you have several?
Hi nonamenobody,
Yes, currently I have 3 servers that use DNS2Go for their external connections, (my ISP uses dynamic IP's, not static), that are behind a Smoothwall 3.0 firewall. I can set all of the machines on the DMZ, however, I need to direct the traffic to each different machine, (i.e traffic for example.com going to example.com and not example.net).
All I need is something that will direct my traffic as it comes past the Smoothwall firewall to the correct machines. It must be able to handle all of the services that I need.
Originally, I had wanted to setup a DNS server, which I thought would deal with the problem, however I had trouble with setting the external IP since it changed constantly. Currently, I am trying to setup a DNS server with DNS2GO's IP's. I will post up if that works.
I am also reading to see if it is possible to redirect the ports on the three servers to achieve the same thing with NAT and iptables. It would be a lot of work, but if I can set it up as a script it might be doable. Ultimately, I just need it to work and be secure, so I am not to picky of how to do it.
Sorry if this is overly verbose, but I wanted to give as much info as I could.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.