LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2016, 12:47 PM   #1
cr3a70r
LQ Newbie
 
Registered: Nov 2016
Posts: 3

Rep: Reputation: Disabled
multiple separate services behind gateway


Hello!
I,we got 2 servers: one should be gateway and another is a hosting server for some services like web, email, ftp, dns etc.
The thing is every domain is bind on its own ip address.
Lets say, i have 3 internet ip addresses:
domain1: 108.144.4.350
domain2: 108.144.4.351
domain3: 108.144.4.352

I should place all my services behind gateway, separately. I mean every domain is available only on its own ip address.

Thats what i think: On my gateway i place HAProxy to proxying http and https(maybe in the future i'd have to balance traffic) and then im SNAT and DNAT forward:
iptables -A PREROUTING -i eth1 -p 0 -m 0 -o eth0 -d 108.144.4.350 -j DNAT --to-destination 10.10.10.2

10.10.10.2 - is equivalent for domain1, which was 108.144.4.350.

Any suggestions?
Thank you very much!
 
Old 11-29-2016, 02:36 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,852

Rep: Reputation: 161Reputation: 161
Domain concept is different from service normally. You can treat them as same if you like.
My point is that you can use different IP if you talk about domain. But for service, you can use different well-known port instead of IP.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 separate networks, only one has a gateway, routing is not working jojothedogboy Linux - Networking 1 07-07-2011 03:55 PM
Destination Host Unreachable On Multiple eth and Multiple Gateway sangprabv Linux - Networking 7 05-28-2010 10:51 AM
separate services on different network interfaces wrban Linux - Networking 2 04-13-2009 04:02 PM
having 2 NIC with 2 separate gateway Swakoo Linux - Networking 7 02-19-2009 09:42 PM
Same subnet, but running specific clients through a separate gateway? atrain Linux - Networking 12 02-05-2008 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration