Port forward to circumvent port 80 block

I use my Linode to run a couple of websites. For development I also run a server at home. A minor annoyance is of course the fact that my ISP blocks port 80. Not a big deal for development, but I'd like to host a small personal website at home as well.

The idea I have in mind is to set the DNS for my personal domain to my Linode, then have all requests to this domain forwarded from port 80 to port 8080 on my home Internet connection.

I've done some basic tunnelling, but this one has me a bit stumped, but I don't see why this couldn't be done. To complicate matters, I run other services on non-blocked ports as well. Ideally I would like to set this up where all port 80 requests to my personal domain are tunneled to 8080, but requests to all other ports would go directly to my home IP without tunneling.

I realize this last goal may be impossible. If it is I can set up a sub-domain that just points directly to my IP.

I am running Ububtu 11.04 Server. Any ideas would be greatly appreciated. Thanks!

2 Replies

Do you already have a web server installed on your Linode? If so, you could probably use it as a proxy. For nginx, see http://wiki.nginx.org/HttpProxyModule and ~~[http://library.linode.com/web-servers/nginx/configuration/front-end-proxy-and-software-load-balancing#sphfront-end-proxy-services-with-nginx" target="blank">](http://library.linode.com/web-servers/n … with-nginx">http://library.linode.com/web-servers/nginx/configuration/front-end-proxy-and-software-load-balancing#sph_front-end-proxy-services-with-nginx](.

EDIT: Disregard my question about already having a web server. Reading comprehension fail :-)

@jeremiahrich:

The idea I have in mind is to set the DNS for my personal domain to my Linode, then have all requests to this domain forwarded from port 80 to port 8080 on my home Internet connection.
Easiest: Use the web server that you already have your Linode. Add a virtual host for your home-hosted domain, and tell it to proxy all requests to your home IP at port 8080.

More Difficult: SSH reverse tunneling.

SSH into your Linode. Use the "-R" switch to forward the Linode's port 80 to your home computer's port 8080. You'll need to log in as root in order to use port 80, though. Keeping a root SSH session open at all times is not recommended. Also, the SSH tunnel might be fragile, especially if your home connection isn't rock solid. You'll need to run SSH in a loop (using a bash script) in order to reconnect automatically if the tunnel gets disconnected. But this requires no-password public key logins, which is a bad idea to have on a root account. Oh, and you'll also need another IP address because you don't want to interfere with your other sites.

Given all the hassle and potential security issues, you might as well just host that little site on your Linode. Thanks to version-control tools such as git and hg, and file synchronization tools such as rsync, it's very easy to develop locally and push to a remote server whenever you want to.

@jeremiahrich:

To complicate matters, I run other services on non-blocked ports as well. Ideally I would like to set this up where all port 80 requests to my personal domain are tunneled to 8080, but requests to all other ports would go directly to my home IP without tunneling.
That looks impossible. If the DNS for your domain points to your Linode, anyone who visits that domain will be directed to your Linode, regardless of the port they use. You will probably need a separate subdomain.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct