Jump to content

Server behind VPN

TVH7

Hey guys a quick question here:

At home I run a simpel webserver and stuff, but I want another webserver on my network. Problem is that iam running behind a NAT so I only have 1 ip adress. (My ISP wont give me more than that). So I had an idea, VPN to a simpel vps and run the server from there. Then I can use the VPN Server's IP adress. Obviously this is not going to work standard using Openvpn server and a linux box. I think I need something like an gateway but since iam not really a VPN prof I would like to ask it to you.

 

So what I want

 

Homeserver -> VPN -> VPN IP -> World Wide Web

 

Browser -> (VPN PUBLIC IP) -> Website

 

Hope you guys can help me
 

Oh yeah: I dont want a Proxy server for my 2 webservers since I want to run some more programs which the ports are allready in use on my home ip.

TVH7 , Scheeps dont like meat.

Link to comment
Share on other sites

Link to post
Share on other sites

set up some sort of port forwarding. 

website1.com:80

website2.com:3025

Then what ever you're using for DNS hosting have them tie the port to your IP address.

 

so I type website1.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:80) Computer sends request to your server and your server responds with the appropriate data for website1.

when I type website2.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:3025) Computer sends request to your server and your server responds with the appropriate data for website2.

 

Or set your servers up as a forest and and host both sites from the cluster.

One Steam to rule them all, One Sale to find them, One Sale to bring them all and with their wallets, bind them! - r/pcmasterrace 17/01/2014

Spoiler
  • CPU: Intel Core i7 6700k
  • CPU Cooler: CM Hyper 212+ 
  • RAM: 16GB Kingston HyperX Fury 2400Mhz (2x8GB)
  • GPU: Gigabyte G1 R9 390 
  • Mobo: Asus Z170-AR
  • PSU: Antec High Current Gamer 900W 
  • Storage: 240GB intel 520 SSD (OS), Sandisk 128GB SSD(Other OS) 2x 2TB Seagate Barracuda 
  • Case: Fractal Design R4

 

Link to comment
Share on other sites

Link to post
Share on other sites

Problem is that that is not how I want it, since I want to use some other ports which are allready in use. IE. Teamspeak, Vsphere Client, Node JS etc. The example you just gave is a workaround just for the webserver. But I basicly want an workaround to get an extra ip adress and just bypass my isp's IP.

TVH7 , Scheeps dont like meat.

Link to comment
Share on other sites

Link to post
Share on other sites

You can use a VPN if you want but be prepared for a slow and expensive connection.

One Steam to rule them all, One Sale to find them, One Sale to bring them all and with their wallets, bind them! - r/pcmasterrace 17/01/2014

Spoiler
  • CPU: Intel Core i7 6700k
  • CPU Cooler: CM Hyper 212+ 
  • RAM: 16GB Kingston HyperX Fury 2400Mhz (2x8GB)
  • GPU: Gigabyte G1 R9 390 
  • Mobo: Asus Z170-AR
  • PSU: Antec High Current Gamer 900W 
  • Storage: 240GB intel 520 SSD (OS), Sandisk 128GB SSD(Other OS) 2x 2TB Seagate Barracuda 
  • Case: Fractal Design R4

 

Link to comment
Share on other sites

Link to post
Share on other sites

I think you dont understand me. I can just setup a VPN connection, not expensive at all. But I want to run a server behind the vpn. So I can use the VPN's IP adress as an webserver ip adress. I dont't think you have the right knowledge for my problem..

 

Basicly I need an extra IP and my isp won't give me one. So iam trying to find a way to get an extra ip.

TVH7 , Scheeps dont like meat.

Link to comment
Share on other sites

Link to post
Share on other sites

I think you dont understand me. I can just setup a VPN connection, not expensive at all. But I want to run a server behind the vpn. So I can use the VPN's IP adress as an webserver ip adress. I dont't think you have the right knowledge for my problem..

 

Basicly I need an extra IP and my isp won't give me one. So iam trying to find a way to get an extra ip.

I can't seem to understand why you would need two IP's. Running both the webservers off the same IP but on different ports would work just fine. Please explain why you need more than 1 IP?

My Current Build: 

Intel i5 3570K @ 4.4GHz 1.11V, Cooler Master Hyper 212 EVO, Asrock Z77 Extreme4, Corsair Vengeance 8GB 1600MHz, Samsung 840 EVO 250GB, Asus GTX 760 DCII Overclocked, Corsair CX600M

Link to comment
Share on other sites

Link to post
Share on other sites

Quote:
Oh yeah: I dont want a Proxy server for my 2 webservers since I want to run some more programs which the ports are allready in use on my home ip.

--

So again... It isn't just for my webservers its for alot of different tools. Since iam having 2 development servers with the SAME services running on them. But i'll probably ask this on webhostingtalk anyways... Since this won't help me any further. Constantly asking me WHY, thats not how it works. I want it so live with it. Cmon guys, linustechtips forum disapoints me :(

TVH7 , Scheeps dont like meat.

Link to comment
Share on other sites

Link to post
Share on other sites

Quote:

Oh yeah: I dont want a Proxy server for my 2 webservers since I want to run some more programs which the ports are allready in use on my home ip.

--

So again... It isn't just for my webservers its for alot of different tools. Since iam having 2 development servers with the SAME services running on them. But i'll probably ask this on webhostingtalk anyways... Since this won't help me any further. Constantly asking me WHY, thats not how it works. I want it so live with it. Cmon guys, linustechtips forum disapoints me :(

Why would you need a Proxy server? And there is TONS of ports available you don't need to use all the same ones.

My Current Build: 

Intel i5 3570K @ 4.4GHz 1.11V, Cooler Master Hyper 212 EVO, Asrock Z77 Extreme4, Corsair Vengeance 8GB 1600MHz, Samsung 840 EVO 250GB, Asus GTX 760 DCII Overclocked, Corsair CX600M

Link to comment
Share on other sites

Link to post
Share on other sites

set up some sort of port forwarding. 

website1.com:80

website2.com:3025

Then what ever you're using for DNS hosting have them tie the port to your IP address.

 

so I type website1.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:80) Computer sends request to your server and your server responds with the appropriate data for website1.

when I type website2.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:3025) Computer sends request to your server and your server responds with the appropriate data for website2.

 

Or set your servers up as a forest and and host both sites from the cluster.

 

DNS can't specify ports.

 

You can run multiple websites on the one webserver...

Link to comment
Share on other sites

Link to post
Share on other sites

Quote:

Oh yeah: I dont want a Proxy server for my 2 webservers since I want to run some more programs which the ports are allready in use on my home ip.

--

So again... It isn't just for my webservers its for alot of different tools. Since iam having 2 development servers with the SAME services running on them. But i'll probably ask this on webhostingtalk anyways... Since this won't help me any further. Constantly asking me WHY, thats not how it works. I want it so live with it. Cmon guys, linustechtips forum disapoints me :(

Perhaps you should reconsider the way in which you are trying to set this up. The method which you are suggesting does not make a lot of logical sense to many of us as there are many more elequant ways of achieving your goal.

 

Having the same services on two servers does not stop you from running them both off of one public IP. If you set up portfowarding correctly then you can have all of your services on your secondary server run at the same time but on different ports.

E.G.

server1 ftp = port 21

server2 ftp = port 5021

You can even do this without changing what port it runs on the actual server itself.

So your local ip:port (e.g. 192.168.0.2:21) does not change.

 

With the webservers, is there a specific reason why you need two webservers instead of one running multiple virtualhosts?

You can set up different virtualhosts to respond to different web adresses, e.g. vhost1 respsonds to example.com, vhost2 responds to 1.example.com.

If you need two webservers, then just use a reverse proxy to forward from your first webserver to the second for a specifc(s) vhosts.

 

 

Edit: I run one physical server at my home with several linux containers and several virtual machines. A few of my mates use the containers and vms to host things like Minecraft servers, CS:GO/Gmod servers, personal websites and they all use FTP to transfer files. Each of them use a separate container (so they are sandboxed and have different local IPs) but all of the services run off one public IP.

Link to comment
Share on other sites

Link to post
Share on other sites

HOME

  • Server1:80
  • Server2:81

VPS

  • ReverseProxy:80 -> Server2:81

 

You don't need a VPN for this just set up a reverse proxy (Apache can do this very easily) to forward to something like port 81.

Link to comment
Share on other sites

Link to post
Share on other sites

DNS can't specify ports.

 

You can run multiple websites on the one webserver...

Oh my bad. I would have sworn you could but you're right.

 

Ditch my idea go with Ssoele's

One Steam to rule them all, One Sale to find them, One Sale to bring them all and with their wallets, bind them! - r/pcmasterrace 17/01/2014

Spoiler
  • CPU: Intel Core i7 6700k
  • CPU Cooler: CM Hyper 212+ 
  • RAM: 16GB Kingston HyperX Fury 2400Mhz (2x8GB)
  • GPU: Gigabyte G1 R9 390 
  • Mobo: Asus Z170-AR
  • PSU: Antec High Current Gamer 900W 
  • Storage: 240GB intel 520 SSD (OS), Sandisk 128GB SSD(Other OS) 2x 2TB Seagate Barracuda 
  • Case: Fractal Design R4

 

Link to comment
Share on other sites

Link to post
Share on other sites

Hey guys a quick question here:

At home I run a simpel webserver and stuff, but I want another webserver on my network. Problem is that iam running behind a NAT so I only have 1 ip adress. (My ISP wont give me more than that). So I had an idea, VPN to a simpel vps and run the server from there. Then I can use the VPN Server's IP adress. Obviously this is not going to work standard using Openvpn server and a linux box. I think I need something like an gateway but since iam not really a VPN prof I would like to ask it to you.

 

So what I want

 

Homeserver -> VPN -> VPN IP -> World Wide Web

 

Browser -> (VPN PUBLIC IP) -> Website

 

Hope you guys can help me

 

Oh yeah: I dont want a Proxy server for my 2 webservers since I want to run some more programs which the ports are allready in use on my home ip.

 

set up some sort of port forwarding. 

website1.com:80

website2.com:3025

Then what ever you're using for DNS hosting have them tie the port to your IP address.

 

so I type website1.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:80) Computer sends request to your server and your server responds with the appropriate data for website1.

when I type website2.com it sends the request to the DNS server, DNS Server sends response (e.g. 200.200.100.100:3025) Computer sends request to your server and your server responds with the appropriate data for website2.

 

Or set your servers up as a forest and and host both sites from the cluster.

 

Problem is that that is not how I want it, since I want to use some other ports which are allready in use. IE. Teamspeak, Vsphere Client, Node JS etc. The example you just gave is a workaround just for the webserver. But I basicly want an workaround to get an extra ip adress and just bypass my isp's IP.

 

I can't seem to understand why you would need two IP's. Running both the webservers off the same IP but on different ports would work just fine. Please explain why you need more than 1 IP?

 

Yoiu can run millions of websites from the same IP. Why has nobody mentioned this?

 

You dont need multiple IPs for multiple websites.

 

 

Just set up a virtualhost in Apache (or whatever http server youre using). Apache will know which website is being accessed based on the domain name in the HTTP headers.

Link to comment
Share on other sites

Link to post
Share on other sites

Guys I know all that what you are saying but I don't want that. I just want an extra IP. 
Reason? Because its better to run VM's on the standard port. And the most of the time my VM's are indeed webservers, but thats not always the case. So I don't wanna spend time chaning ports etc. I know I can, but I just don't want to do that. I also have a team of developers developing on my home server. And they have to spin some vm's up. And I don't wanna go and constanly see which port I need etc. So my idear was: Buy a VPS run a VPN client on it and use those IP adresses for my servers at home. And I use my servers at home because I can control those better and quicker. (Custom ISO's and stuff)

TVH7 , Scheeps dont like meat.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×