Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed a server in one of my computer, I am using a router, I can go to the server from my other networked computers by defining the ip address in the address bar, like 192.168.1.101.

all my networked computers can work on that page with this ip, but now my question is if I want to access this server from outside what should I put in the address bar?

if I put my ip address it goes to directly the router config page not to the server

I understand that i need to redirect it to the .101 address but how can I do that any idea? so that my user can access to that page from outside.

share|improve this question

migrated from stackoverflow.com May 31 '11 at 6:28

This question came from our site for professional and enthusiast programmers.

closed as off topic by gravyface, Bart De Vos, Mark Henderson May 31 '11 at 23:02

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Closing this as Off Topic, as there are already a dozen questions about this exact problem on Server Fault and Super User. Additionally, this does not smell like a Professional IT scenario, so it should have gone to superuser in the first place. –  Mark Henderson May 31 '11 at 23:05

1 Answer 1

What you are searching for is called port forwarding. To enable port forwarding, you must log into your router and tell it that all unexpected incoming traffic from the network, on a certain port, is to be forwarded to that particular internal IP address.

An analogy is that your router which performs NAT (network address translation) is like the front desk of an apartment building. If it receives mail from the outside saying "Do you have any HTTP?", the front desk will assume it is spam and ignore it. Port forwarding would be like Bob telling the front desk "I am providing HTTP, if someone asks about HTTP, forward it to me."

In general, NAT is a bad thing (except in very complicated corporate security), and will ideally go away when ipv6 appears.

"can you please guide me how can I do that?"

Log into your router, click on "Port Forwarding", select port 80 (HTTP), and say that incoming requests should go to 192.168.1.101

Then, if you are on the internet, you can access your internal webserver at http://xxx.xxx.xxx.xxx, replaced with the numeric IP of the router (find out from whatismyip.com or some site).

share|improve this answer
    
can you please guide me how can I do that? –  Snowbell92 May 31 '11 at 5:58
    
@Snowbell92 edited –  ninjagecko May 31 '11 at 6:05
1  
Why is NAT a "bad thing"? One of the easiest ways to protect most home users' machines from viruses/other bad stuff is by simply putting a router in front of it. –  spectre256 May 31 '11 at 6:35
4  
@spectre256: it breaks the transparent layout of the internet (as designed), and forces ridiculous hacks to punch holes through the NAT barrier (e.g. peer-to-peer apps; Skype would break if all users were behind NATs). The security issue you describe (externally-initiated worm-like attacks) are a problem with operating systems which have running-by-default poorly-written network services users don't need, and should be handled at that level by sandboxing or other risk minimization techniques. Even (ugh) a local firewall. And a NAT doesn't protect users from even the majority of threats I think –  ninjagecko May 31 '11 at 6:52
1  
Most of the information on how to forward ports for your router can be found on portforward.com (you will however have to wade through their advertisements). –  Egon May 31 '11 at 11:34