Wednesday, 18 April 2012

How to Port Forward on a DLink router for your server

It just hit me that most people in the world use Windows, (duh) so i had better do a quick tutorial on
port forwarding for various servers on a non-apple router, i will be using a DLink as an example.
Port forwarding on a Dlink is just as simple and straight forward as on an Apple Time capsule
or Airport Extreme.
Why would you need to Forward a port?
Simple answer: so people can access you server from outside you LAN or Local Area Network.
So lets get to it.
Note: this tutorial was requested by a Minecraft player i know by the name of Veyleus. ~Hope this helps :)

What you will need >>>

  • Username and Password to your Dlinks admin page
  • 5 minutes of time if all goes well
  • 7 minutes if you have trouble and need to ask a question on the mini-forum

Step 1, how to access the routers admin page:



First you need to determine if your Dlink will let you access the admin page via wifi.
Some dont allow this for security reasons. But you can change that setting.
Open up and browser and type in 192.168.0.1 this is the default address for a Dlink router
For a Linksys and most other router its 192.168.1.1

If you get a page not found or and you cant connect and itsnot prompting you for a username and
pasword, then its probably not allowing wireless administration. To fix this find an old Ethernet back in the back of your desk drawer and plug in one end to your computer and the other to the back of your router in the Ethernet port. (Assuming that you have a laptop and can go to where your router is or have a long enough Ethernet cord)

Then just enter the same address: 192.168.0.1 in your browser.
It should supply you with 2 fields to enter you password and user name.
The default to Dlink routers is Username: admin Password: private

But normally the password is not the default one, you have to know that password or ask someone who does.

If all go well the admin page should be served up.

Step 2, forwarding the port:

Click the "Port Forwarding" button on the side, a page similar to this should be displayed



Move down to where you see a table like this:


Pick and name of you choice. e.g. Mincraft server.
Then for IP Address put the local ip or you computer, you should know how to find the local ip of your computer but if you don't, drop me a comment. 

Under ports to open:
Put a range of ports instead of just one port, i find it works better for server FTP servers and Minecraft.
For Minecraft i would put the ports like this: 24000-26000 assuming you Minecraft server is running at the default port of 25565.
Put the same port range both the TCP and UDP fields.
You can leave the "Schedule" and "Inbound Filter" selection boxes as they are shown in the image.

Step 3, saving changes and testing:

Click save changes at the top and let your router do its thing and reconfigure.

After that to test it, turn on your server and test it with your local ip to confirm it is working and serving.
Then find your external IP and whatismyip.com and then you that ip to connect instead.

If you can connect to your server using your external ip then grab a bag of pretzels and a glass of Koolaid and just marvel at how you were able to get it to work the first time you tried it :)

But things never work the first time with me so if you have any trouble, drop me a comment and i will see if i can help.

Trouble Shooting:

Some routers may not support ranged port forwarding, so instead of putting 24000-26000 for the ports, just put 25565 or whatever port you are looking to forward.

Some routers may also not allow outside connections from your local network. So you might need to go a to a friends house or an internet cafe to test it. But this is rarely the case.

Make you that you server is running on the port you think it is and that you port forwarded that port.



Tuesday, 17 April 2012

How to port forward on an apple router


When i first needed to port forward some ports for my FTP server on my router, in this case
a Time Capsule i had a bit of trouble finding a tutorial on how to do it.
Most of the port forwarding tutorials out there are for Linksys, Netgear, and Cisco routers.

So in this little tutorial i will show you step my step how to forward ports on an Apple Time
Capsule router or Airport extreme. Now the interface for the Airport utility has changed a bit
it the last update. i will be showing you using the most recent version.

What you will need:

Full password privileges to the router
You need to know what ports you want to forward for you server
A few minutes of time


Step 1:


Go to spotlight and type in "airp" , the Airport utility should come up
hit enter and start up the program.




Step 2:


Click on the you main router if you have more than one for instance if you have
another one to extend you network. Then Click "Edit" to edit the router configuation.



Step 3:


Navigate to the "Network" tab, and go down to where is says "Port mapping"
Check "Enable NAT Port Mapping Protocol"
Click the "+" button to add a new Port map.



Step 4:


Notice i have allowed a range of 10 ports.


Fill out the form like this>

Add a Description of your choice.

For Public UDP Ports: put the range of ports you would like to forward. For example
putting 18-25 will forward ports 18 through 25. Even though the standard ftp port is 21,
i found you were better guaranteed a remote connection if you forwarded a few other ports in
that range. For you info this will also forward the ports for FPT, SSH, and TELNET
protocols. So you killed 3 birds with one stone.
Put the same value in all these fields also:

Public TCP Ports

Private UDP Ports

Private TCP Ports

Now for "Private IP Address" you will want to put the local ip of the computer
you want to forward the public requests to. E.g the LAN ip of the server that you
want to access from the outside.

Click save. You will then need to update the router. Click Update.
The router will be unavailable for a few seconds while it reconfigures.

When you see a green icon next to the router appear again, then the router is a ready
and now accepting external requests on the ports you just forwarded and is sending those
requests to the IP address on the computer on your LAN that you specified.


Step 5, Testing it:


Now i am assuming you have the server up and running that you wanted to connect to from outside
your LAN e.g. from any hotspot in the world (pretty cool eh?) wether it be FTP or Minecraft.

I will use FTP as an example.
Go to whatismyip.com to find your external ip, your networks id on the www.
Copy the ip to your clipboard.
Go to your favorite browser and type in the following:

ftp://your_external_ip:21

( replace "your_external_ip appropriately" )( replace 25 with the port you forwarded )

if you are prompted with a username and password by the browser then you did it!
Congrats!
However nothing ever works the first time i do it so if you have any trouble
just drop me a comment and i'll help you.

Extras>>> Common Ports:


  • FTP - 21
  • SFTP and SSH - 22
  • TELNET - 23
  • SMTP mail server - 25
  • NFS 2049
  • MySQL - 3306
  • Minecraft - 25565 (hehe :D)
  • VNC - 5900
  • For a complete list of known ports visit this wiki link


Security Note>>>

Remeber that forwarding these ports will allow people to connect from the outside world.
The only way to prevent evil-doers is to provide a strong password to you FTP os SFTP server.
If not people black-hat hackers can brute force the password to the FTP server, get in, steal you files and or delete them. Quite a serious matter. Btw just becuase i know how to brute force hack a network dosent make me a bad hacker, if you really know about the term, you will know it can used for good and bad. I use those skills to test my own network security.

If you would like me to do a tutorial on network security and penetration testing, just drop me a comment. I would be happy to.


Thursday, 12 April 2012

Blog Updates, new stuff

Hey readers!
Im back from my little break. Thank you Knome for standing in for me and posting that bit about be being away. Enough talk, lets get to the point. I would like to include some of the following as new features/pages to this site.
  • A Q&A page
    • Here you can ask me IT related questions or state a problem you might have
    • The least i can do for you readers is to check the site everyday and answer these
  • Tutorial Articles and links
    • I would like to get more tuts mixed in with my reviews
    • Reviews are good an all but when i go searching the net to find out how to
    • something i usually want a well-written blog tutorial
    • You can also request tutorials on the Q&A page
I have a couple a cool things i would like to make tutorials on, things that i did not know myself and then
went out and found a tutorial or a combination of tutorials to teach me how to get the job done.
So stay tuned, use Google listen to jango.com  and play on Epicraft! :D