Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
![Reply](https://www.linuxquestions.org/questions/images/buttons/reply.gif) |
04-01-2014, 10:09 AM
|
#1
|
LQ Newbie
Registered: Oct 2013
Location: Kiev, UA
Distribution: CentOS
Posts: 10
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
traffic redirection by domain name to external addresses
Hi.
We using Linux CentOS.
For example - we have 3 hosts - host1.domain.com, host2.domain.com, host3.domain.com. Hosts connected via VPN.
Task: host1.domain.com must be a gateway for http/https traffic, and redirect requestes to host2.domain.com and host3.domain.com.
host1.domain.com will have external IP and accepts request on 80 port.
host2.domain.com and host3.domain.com - internal IP and accepts request on 8080 and 8443 ports.
How this can be realised? IPTABLES, NGINX, something else?
And - what about other traffic? SSH, samba etc.
Thanks.
|
|
|
04-01-2014, 10:37 AM
|
#2
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep: ![Reputation: 148](https://www.linuxquestions.org/questions/images/reputation/reputation_pos.gif)
|
Check this website have explanation to configure nginx as reverse proxy.
http://www.cyberciti.biz/tips/using-...rse-proxy.html
Do you need SSH and Samba access via your external IP? if not just restrict SSH and Samba access on your local network only.
|
|
1 members found this post helpful.
|
04-01-2014, 11:02 AM
|
#3
|
LQ Newbie
Registered: Oct 2013
Location: Kiev, UA
Distribution: CentOS
Posts: 10
Original Poster
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Thanks, @kirukan - I'm also assume to use NGINX to redirect HTTP traffic.
But also - I want to redirect SSH, MySQL and Oracle traffic from external network - to internal servers in this VPN network. Can it be done?
For examle - I'm in external network and want open connection to MySQL database servers in this VPN network.
Lets assume that MySQL server #1 have IP 10.0.0.2 (internal) and MySQL server #2 have IP 10.0.0.3 (internal).
host1.domain.com - have IP 77.120.120.77 (external) and 10.0.0.1 (internal).
I want to have ability open connection to MySQL server #1 via request like "open host2.domain.com:3306" and MySQL server #2 via request like "open host3.domain.com:3306".
Thanks for tips.
|
|
|
04-01-2014, 11:44 AM
|
#4
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep: ![Reputation: 148](https://www.linuxquestions.org/questions/images/reputation/reputation_pos.gif)
|
Let me draw a picture about your setup. I guess you would like to setup a web-based application by using Nginx, Apache, Mysql/Oracle. So here Nginx is going to be a reverse proxy, Apache is the middleware and Mysql/Oracle are the Back-end.
As per your earlier posts all these servers are in your internal network so Nginx, Apache and Mysql/Oracle can talk each other.
Configure the external IP in nginx. whoever access your web application from internet they first hit nginx then nginx will handle those HTTP/HTTPS connections.
So you don't want to expose your real web application and database servers to public.
If I am wrong make it bit more clear about your questions...
Last edited by kirukan; 04-01-2014 at 11:46 AM.
|
|
|
04-01-2014, 11:59 AM
|
#5
|
LQ Newbie
Registered: Oct 2013
Location: Kiev, UA
Distribution: CentOS
Posts: 10
Original Poster
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Not exactly. Web-application (Tomcat in fact) - it is one story.
Other applications (database servers, LDAP, SSH access) - other one.
So, speaking about MySQL access - means that I want really open direct connection to different MySQL (or any other service) servers in internal - from external network.
|
|
|
All times are GMT -5. The time now is 02:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|