Archive | Networking RSS for this section

How to hard reset D-Link DIR-825

D-Link DIR-825
Specifications You can find them on the router`s page – here
Firmware Click here to download
Manual Click here
Factory reset(Hard reset) To reset the router, locate the reset button (hole) on the rear panel of the unit. With the router powered on, use a
paperclip to hold the button down for 10 seconds. Release the button and the router will go through its reboot process.
Wait about 30 seconds to access the router. The default IP address is When logging in, the username is
admin and leave the password box empty.

Find and compare routers and other networking devices

Finally found a great site with comprehensive list of networking devices and various info about routers, switches, access points and basically all types of networking devices including professional rack routers and gateways. The best part is there’s info about specifications and services each router/switch is providing, and therefore can be compared with a couple of clicks. It certainly took my attention, plus the database of wireless network devices is quite large and seem up-to-date. If you are looking for router specs, reviews or manuals this is the place I’d recommend. Oh, and the information about default login details and factory reset is listed on most devices specs pages. Since there’s a basic social functionality, you can register and earn points as well as participate in Q&A and ask questions for your router problems or any networking discussions, such as which one to choose. Interestingly enough, If you want to keep finger on top of the news about all network products, there’s a section with the latest news about networking from major technology blogs.

Bind your server`s dynamic ip address to both Linux and Windows)

Recently I built up a server for developing purposes, and after I set it up I realized that my ISP provides me with only a dynamic ip address. So the solution was obvious…set my router to use DynDNS(they has a free service of course). Of course it didn`t work(obviously as I`m writing this). DynDNS changed their API and my router didn`t have firmware update to fix it….So I decided to write an application which syncs the current IP address with dyndns using their API. I wrote the application on C# using Mono to run it on the  linux server. The code is just a mockup I`m open for any suggestions or optimizations…

What it actually does is check your current IP at and compares the result with the last checked IP(if any). If the IP got changed the application connects with the DynDNS API and renews the IP address.  You can change the period on which the application checks for IP changes from System.Threading.Thread.Sleep(). It is in ms so for 1 minute you should set it to System.Threading.Thread.Sleep(60000).

In order to use it you should change exampleusername, examplepassword and to your actual username, password and hostname and compile the Application(You can use Compilr if you don`t have Visual Studio installed).

using System;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace ConsoleApplication1
 class Test
 static void Main(string[] args)
 int repeat = 1; //Used for the infinite loop
 Console.WriteLine("DynDNS sync system");
 string lastIP = "";
 string myRequestURL = string.Format("");
 string strippedIP2 = "";
 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(myRequestURL);
 string myResponse = new StreamReader(myRequest.GetResponse().GetResponseStream()).ReadToEnd();
 Console.WriteLine("Your current IP is: ");
 string RegexPattern = @"<html><head><title>Current IP Check</title></head><body>Current IP Address: .*?</body></html>";
 System.Text.RegularExpressions.MatchCollection matches = System.Text.RegularExpressions.Regex.Matches(myResponse, RegexPattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
 foreach (System.Text.RegularExpressions.Match match in matches)
 string strippedIP1 = Regex.Replace(match.Value, "<html><head><title>Current IP Check</title></head><body>Current IP Address: ", "");
 strippedIP2 = Regex.Replace(strippedIP1, "</body></html>", "");
 int ipComparison = string.Compare(strippedIP2, lastIP, true);

if (ipComparison != 0)
 lastIP = strippedIP2;
 Console.WriteLine("The IP address has changed...The new address is: "+strippedIP2);
 string dnsUpdateURL =""+ strippedIP2 +"&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG";
 // Get HTML data
 WebClient client = new WebClient();
 client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
 client.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes("exampleusername:examplepassword")));
 Stream data = client.OpenRead(dnsUpdateURL);
 StreamReader reader = new StreamReader(data);
 string str = "";
 str = reader.ReadLine();
 while (str != null)
 str = reader.ReadLine();
 catch (WebException exp)
 Console.WriteLine(exp.Message, "Exception");
 Console.WriteLine("IP hasn`t changed!");
 System.Threading.Thread.Sleep(300000); //The period on which the application will re-check the IP
 while (repeat > 0);

So If your router doesn`t support DynDNS and you want your server/PC to be accessible over the internet for free this is the easiest way you can do that.

When I wrote this i found the API documentation(which is great btw) to be very helpful.
DynDNS API Documentation 

If anyone needs to ask a question, finds this article helpful, or needs the compiled source feel free to post a comment 🙂