LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2015, 01:22 AM   #1
shobhit.gupta.it
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Rep: Reputation: Disabled
[Urgent] Web requests from Public to Private IP


Hi...
I am working on website for my organization and need urgent help for managing the server.
Scenario:
1 CentOS based BIND DNS Server with Public IP (assume 1.2.3.4) with a domain name (assume abc.edu.in)
2 Windows based IIS Web Server for Dot Net based Website on an internal private IP. (assume 5.1.1.2)
3 Linux based Web Server for PHP based Website on an internal private IP. (assume 5.1.1.3)
Requirement:
1. When a user requests abc.edu.in, website from 5.1.1.2 should be served.
2. When a user requests abc.edu.in/yy, website from 5.1.1.2 should be served.
3. When a user requests yy.abc.edu.in, website from 5.1.1.3 should be served.

A step-by-step elegant solution is highly appreciated. Please help.
Thanks and Regards,
 
Old 02-20-2015, 08:37 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by shobhit.gupta.it View Post
Hi...
I am working on website for my organization and need urgent help for managing the server.
Scenario:
1 CentOS based BIND DNS Server with Public IP (assume 1.2.3.4) with a domain name (assume abc.edu.in)
2 Windows based IIS Web Server for Dot Net based Website on an internal private IP. (assume 5.1.1.2)
3 Linux based Web Server for PHP based Website on an internal private IP. (assume 5.1.1.3)
Requirement:
1. When a user requests abc.edu.in, website from 5.1.1.2 should be served.
2. When a user requests abc.edu.in/yy, website from 5.1.1.2 should be served.
3. When a user requests yy.abc.edu.in, website from 5.1.1.3 should be served.

A step-by-step elegant solution is highly appreciated.
Sorry, this isn't the place to come to get 'step-by-step' guides. Also, please read the LQ Rules, the "Question Guidelines" and "How to ask a smart question" links in my posting signature. This is NOT URGENT for ANYONE HERE...this is a volunteer forum, asking for/expecting 'urgent' help is fairly rude.

And based on what you posted, there isn't anything difficult here. You have a different domain name for the Windows server vs. the Linux/PHP server. Since you have different domain names for the PHP server, then just putting those names into DNS takes care of it. Anything for abc.edu.in goes to one address/server, anything to yy.abc.edu.in goes to the other address/server. Simple.

If you need 'step-by-step' guides on how to build a DNS server, there are THOUSANDS you can look up with a Google search, and a similar number for how to set up PHP/LAMP servers on Linux as well. If you have an actual PROBLEM doing something, post a SPECIFIC QUESTION and we will be happy to help you. But don't ask us to look up how-to guides for you. If you need 'urgent' help, and you don't feel like you can do this, I'd suggest hiring a consultant to help you.

EDIT: Since you've been asking about/working with DNS for TWO YEARS now, you should easily be able to perform the correct DNS mappings.

Last edited by TB0ne; 02-20-2015 at 08:39 AM.
 
Old 02-20-2015, 10:22 AM   #3
sudowtf
Member
 
Registered: Nov 2013
Posts: 205

Rep: Reputation: 46
I agree with TBOne. Simple DNS A records should solve your issue.

However, in the case that you are not stating you whole issue correctly and in the interest of helping:

If the internal network is running Windows Active Directory, and your true issue is that a request to www sends you to the A.D. server(s), then you may need to utilize the port forwarding feature of windows' netsh:

Code:
netsh interface portproxy add v4tov4 listenport=80 listenaddress=LOCAL_IP connectport=80 connectaddress=REMOTE_IP
netsh interface portproxy add v4tov4 listenport=443 listenaddress=LOCAL_IP connectport=443 connectaddress=REMOTE_IP
which needs to be done on each Active Directory Domain Controller.

Of course, specific Active Dir. DNS settings should solve this, but I've failed to make it work properly so have opted for the above in our environment. (We have both private Windows A.D. DNS servers and public RedHat BIND servers)
 
1 members found this post helpful.
Old 02-20-2015, 10:51 AM   #4
shobhit.gupta.it
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, you are right that its not urgent for any one else out there, but it is urgent for me. reply after 1 month won't help me out thats why i mentioned it there. If requesting a quick reply seems rude to you and this community, then I think I made a wrong forum choice and I should not post again.

Regarding solution, I have tried IPv4 forwarding, using IP of internal range, html header resetting, DNS forward records, etc but nothing worked. Only after that i posted my problem here.

Quote:
Originally Posted by TB0ne View Post
Sorry, this isn't the place to come to get 'step-by-step' guides. Also, please read the LQ Rules, the "Question Guidelines" and "How to ask a smart question" links in my posting signature. This is NOT URGENT for ANYONE HERE...this is a volunteer forum, asking for/expecting 'urgent' help is fairly rude.

And based on what you posted, there isn't anything difficult here. You have a different domain name for the Windows server vs. the Linux/PHP server. Since you have different domain names for the PHP server, then just putting those names into DNS takes care of it. Anything for abc.edu.in goes to one address/server, anything to yy.abc.edu.in goes to the other address/server. Simple.

If you need 'step-by-step' guides on how to build a DNS server, there are THOUSANDS you can look up with a Google search, and a similar number for how to set up PHP/LAMP servers on Linux as well. If you have an actual PROBLEM doing something, post a SPECIFIC QUESTION and we will be happy to help you. But don't ask us to look up how-to guides for you. If you need 'urgent' help, and you don't feel like you can do this, I'd suggest hiring a consultant to help you.

EDIT: Since you've been asking about/working with DNS for TWO YEARS now, you should easily be able to perform the correct DNS mappings.
 
Old 02-20-2015, 12:10 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by shobhit.gupta.it View Post
Yes, you are right that its not urgent for any one else out there, but it is urgent for me.
..and that STILL doesn't make it urgent for anyone here, thanks. If you need 'urgent' help, then you need to HIRE SOMEONE, and tell them to hurry up.
Quote:
reply after 1 month won't help me out thats why i mentioned it there. If requesting a quick reply seems rude to you and this community, then I think I made a wrong forum choice and I should not post again.
That's up to you...but since you posted two years ago, this is your first post since. And asking for 'urgent' ASAP help IS RUDE on a volunteer forum, no matter what you think.
Quote:
Regarding solution, I have tried IPv4 forwarding, using IP of internal range, html header resetting, DNS forward records, etc but nothing worked. Only after that i posted my problem here.
..and you told us NOTHING about any of this when you first posted, did you? And again, you don't need ANY of this...enter two DNS A records, and you're done, period.
 
  


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
Is Private Web Browsing Really Private? LinuxCrushesWindows Linux - Software 16 03-03-2014 12:38 PM
public IP and Private IP mysqldb02018 Linux - Virtualization and Cloud 4 05-07-2013 10:49 PM
Cant use public external dns (seems isp blocks requests) joenew Linux - Networking 2 09-22-2010 03:47 AM
Public and private NIC for web server vondie Linux - Server 2 08-28-2009 08:24 AM
public vs private ip emailssent Linux - Networking 2 09-28-2004 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:12 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