Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

for instance, I could run a web server on my computer with is connect to router which suggest it doesn't have a public ip address. How can I send data to it from other client or server?

Web socket seems promising, but what I want is a well support solution in command line, and doesn't require change the setting on the router, such as port-forward.

share|improve this question
You can look at for a list of techniques for connecting through NAT routers, but you are probably expecting something that doesn't exist. To have a regular web server responding on port 80, port forwarding in the router is the way to go - it is as simple as that (and port forwarding is simple). The computer on the outside can not initiate contact with the internal computers without going through the NAT router, and there is no way to individually address internal computers without explicitly instructing the router. Hence port forwarding. – Daniel Andersson Apr 13 '12 at 7:35
It really depends what router is doing (NAT?), what the router supports (UPnP?), and what you want to do once you're connected. – David Schwartz Apr 13 '12 at 7:59
up vote 1 down vote accepted

Port Forwarding

Port forwarding is by far the easiest solution.

Reverse SSH Tunnel

Another way would be to involve a third-party publicly accessible server as a relay. You'd have to initiate a connection to this third-party server from the web-server (since your router blocks inbound connections) and then use that connection to relay HTTP traffic via the third-party server..

This can almost certainly be done using SSH tunnelling

I frequently need to get access to a machine behind a firewall to do some web development, but I don’t have a VPN available. Not a problem – just use a reverse SSH tunnel. By the end of this tutorial, we’ll be able to SSH to the remote server, as well as view any web pages that server has access to.

(my emphasis)

share|improve this answer
Both of you guys' answer looks promising. I would try it now. thanks – mko Apr 13 '12 at 10:47

As an alternate to ssh tunneling, you might want to consider ipv6 tunneling. I use gogo6/freenet6 as a ipv6 provider (though there's other providers). On windows, the client generally just works. On linux, you'll need to compile the client. Once this is done though, you can access the system through any system that supports ipv6.

The advantage of setting up an ipv6 tunnel is you can then do things as if it was a regular, public ip address cause it is.

share|improve this answer
gogo6 is radical new for me. Does this mean I would have a permeant ipv6 address regardless whatever machine I use? – mko Apr 13 '12 at 10:55
Well, you can set it up per system to have an ip address for each. If you run the client with a username and password, its a permanant, static ipv6 address, otherwise its dynamic. – Journeyman Geek Apr 13 '12 at 11:13
SU has some good Qs/As on IPv6 but I'd love to see a good blog article on setting up and using IPv6 in a home or SOHO setting. Just a thought :-) – RedGrittyBrick Apr 13 '12 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .