Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[Tutorial] Portfowarding made simple!

Portforwarding made simple
- Difficulty (Easy): **********■*****■ -

[IMG]http://img821.imageshack.us/img821/999/firwall.png[/IMG]

I made this tutorial in order to help people having problems with portforwarding (seems to be a big problem here)
follow these simple steps and you'll be portforwarding in no time.


What is portforwarding?

Before we begin I want you to have an understanding of that portforwarding means and stands for. Simply put; Portforwarding is a technique used for mapping ports to different local hosts, It's only applied to if your behind a router.

Heres an example

If your behind a router with ie. 2 computers connected to it, you will all share the same external IP address for example: "241.25.61.251", and you will all have a separate & unique internal IP address such as "192.168.0.2"

Every IP address starting with 192.168.x.x (x = 0-255) is a network IP and is only used inside networks.

Since all traffic goes through the router first, it needs to have certain rules in order to redirect appropriate traffic, do consider this dilemma:

External IP Address: 241.25.61.251

[img]http://img815.imageshack.us/img815/1584/usertc.png[/img] User 1 (Network IP: 192.168.0.108)
[img]http://img815.imageshack.us/img815/1584/usertc.png[/img] User 2 (Network IP: 192.168.028)

If User 1 & User 2 both ran a web server on port 8080, which of the web servers would the user reach while connecting to "241.25.61.251"? The answer is no one, since the router doesn't know where to PORT FORWARD.

--

STEP 1 Grab your local network IP Address

The first thing we want to do is finding our Network IP/Lan IP (192.168.x.x)

Start->Run->CMD->ipconfig

[img]http://img109.imageshack.us/img109/4350/57313282.png[/img]

We can now see that our Network IP is: 192.168.0.108

STEP 2 Log in to your router

In order to actually port forward we need to know the address of our gateway, since our Network IP was "192.168.0.108" our gateway address is: "192.168.0.1" (gateway is .1 by default)

[img]http://img852.imageshack.us/img852/5470/gatewayw.png[/img]

Now we proceed by entering the URL address in the web browser:

[img]http://img94.imageshack.us/img94/5673/dlink.png[/img]

Quote:Do notice that every router has different layout, however the functions are basically the same, what we ware after here is the "port forwarding option" for more help regarding your router check: http://portforward.com/english/routers/p...rindex.htm


Almost every router comes password protected, if you haven't messed around with your router before your username/password should be factory settings. If you are unsure about the factory settings try these combos:

username:password

Spoiler (Click to View)

Also check Portforward.com's list: here

If neither work you have 2 options, either google "your router + default password" trying to find the factory username/password or reset your router to factory settings by searching google for "your router + how to reset router" or similar.

STEP 3 Port forward!

Ok, username "admin" and password "12345" worked, we are now inside the router. What we want to do now is to locate the "port forward" option. In my case it's located here: Advanced->Port forwarding

[img]http://img846.imageshack.us/img846/8148/dlinkpf.png[/img]

Ok, our goal was to open up the port 8080 for User 1 with the Network IP "192.168.0.108" , I always include both TCP/UDP although it's not necessary with UDP in this case but it doesn't hurt :)

When were happy with the changes we click "Save Settings" and wait for the router to restart!

STEP 4 Check whether the port is forwarded

Ok, now we successfully port forwarded the port, let's try and see if it worked. A good tool for this is by using "canyouseeme" which serves as a open port tester. Of course if a web server was the case we could just enter the URL but I want to show this method as well since it can be useful in debugging problems.

Here's a test on port 8080 before port forward:

[img]http://img850.imageshack.us/img850/6195/cyto.png[/img]

Notice the "Connection timeout" response, that means the router didn't now where to forward the port and therefore ignored the response. We could of course simply check if the the port forwarded worked manually by entering the URL.

Here's a test on port 8080 after the port forward:

[img]http://img600.imageshack.us/img600/6081/cysuc.png[/img]

Notice how the response now says "Success" that means the port forward was successful, external users can now access the port 8080 from User 1 "192.168.0.108"

Here's another test on port 8080 after the port forward:

[img]http://img24.imageshack.us/img24/2341/cyref.png[/img]

If it says "Connection refused" it simply means that the current service on the port isn't operative, whenever it says connection refused you can be sure that the port forward has worked, the problem may be in your firewall.

##

FAQ

Before I start adding entries to this list, always make sure your firewall is off if any problems should occur, especially windows firewall.


Q: How can I find my External IP?
A: Visit any what's my IP site, I recommend: http://www.whatsmyip.org/

Q: How can I find my Network IP?
A: Go to: Start-Run->CMD and write "ipconfig" youre network IP should be in the row "IPv4 Address"
will be updated

Resources & Links

Portforward.com
The best resource for port forwarding - they have information on basically every router available.
will be updated

I've read a lot tutorials here covering the same topic, but very few are as clear and polished as this. Great job and thanks for posting.
Very nice tutorial dude. I read a lot of them, but this one is very clear and easy to understand.
(Mar 26, 2011 12:07 AM)counterpoint Wrote:  I've read a lot tutorials here covering the same topic, but very few are as clear and polished as this. Great job and thanks for posting.

(Mar 26, 2011 12:15 AM)Blixx Wrote:  Very nice tutorial dude. I read a lot of them, but this one is very clear and easy to understand.

Thanks! That was exactly what I was after :)
when i check if my port is open but it says "Connection refused" i know you have said its something to do with your firewall but could you help me sort it out im not too sure what to change in my firewall. thanks

Raiid
(Mar 26, 2011 04:40 PM)RAiiDHD Wrote:  when i check if my port is open but it says "Connection refused" i know you have said its something to do with your firewall but could you help me sort it out im not too sure what to change in my firewall. thanks

Raiid

Hey which firewall are you using? However try to disable the Windows firewall firrt, heres a guide on how to do that: http://www.ehow.com/how_4518396_disable-...etely.html
hey when i put my no-ip and my port in dark comet it says .no-ip.biz was not successfully connected to port: 82
could you help me with this please?
(Mar 28, 2011 08:06 AM)RAiiDHD Wrote:  hey when i put my no-ip and my port in dark comet it says .no-ip.biz was not successfully connected to port: 82
could you help me with this please?

First make sure that the port was succesfully forwarded, check on how to find the "Port forward" option on your router: http://portforward.com/english/routers/p...rindex.htm

Also disable the firewall, especially the "Windows Firewall"
man my ip is changeable. well it changes once a day.... in my network there are 60 Ips.... its round robin.... in this case what should i do ?
(Mar 28, 2011 08:28 AM)B33RF3aR Wrote:  man my ip is changeable. well it changes once a day.... in my network there are 60 Ips.... its round robin.... in this case what should i do ?

The external IP? Portforwarding works if youre having an dynamic IP aswell, since portforwarding is simply making rules for the router.

If youre network IP is changing you need to make it static/or portforward on every boot :P
(Mar 28, 2011 08:10 AM)carecare Wrote:  First make sure that the port was succesfully forwarded, check on how to find the "Port forward" option on your router: http://portforward.com/english/routers/p...rindex.htm

Also disable the firewall, especially the "Windows Firewall"

i have my windows firewall off and my a/v firewall off and my ports are fully open so im still puzzled :o
Yeah that's odd, have you tried if the program works without the router? It can be a router problem aswell, it's common in old routers.
This is a very nice TUT and will direct people haveing problems port forwarding to this thread.
However i think everyone should use a VPN with port forwarding.
Thanks, I try to keep it straightforward as It should be, and yeah a VPN is the best alternative for the one whos concerned about their anonymity while hacking :>
nice tutorial
well i m a expert of port forwading :P

THE HEADMASTER


Possibly Related Threads...
Thread / Author Replies Views Last Post
by *Subutex*Oct 16, 2019 08:35 AM 2 189 Oct 16, 2019 08:35 AM
Last Post: *Subutex*
by LbTwoShadesApr 22, 2017 02:56 PM 6 297 Apr 22, 2017 02:56 PM
Last Post: Armada
by DMK OvidiuMay 16, 2016 06:59 AM 6 173 May 16, 2016 06:59 AM
Last Post: ipap0x28