Jan
17th

How to find out what application is using your port

In Linux:

The linux fuser command has a special option for port conflicts.

Use fuser -n tcp <port id> for tcp ports to see which process is using the port.

For example to see which application is already using port 80 use:

$ fuser -n tcp 80

The netstat command can also be used to determine what process is using a port.

Use netstat -nlp and you should see PID and names of programs along with the port they are using (note you can only see the PID of process you own, unless running as root)

$ netstat --nlp

In Windows:

On Windows 2003 the options are as follows: netstat -a -b -o -n

  • -a: gets listening processes (similar to -l on linux)
  • -b: displays the executable name that started using the port (similar to -p on linux)
  • -o: displays the process id (PID) that owns the connection
  • -n: (optional) gives the addresses numerically (same as -n on linux)
Dec
18th

Hexadecimal Color Notation on the Web

When designing elements for your webpage, you will often be called upon to specify a color. For example, the code for a span shown below specifies that the color of the text within the span will be yellow.

Colors can be specified according to their names, for example “yellow”, “green”, or “blue”. In many cases, these simple color names will work. But what if you want to specify a more sophisticated color like “cornflowerblue”? A particular browser may not recognize a particular color name. It’s more reliable to specify colors with an “RGB triplet”.

An RGB triplet specifies a color based upon the amounts of red, green, and blue, on a scale from 0 to 255, required to create the color. For example, to create the color cornflowerblue you need red=100, green=149, and blue=237. We could then specify the color of the text within a span using the rgb function as shown below.

(more…)

Dec
18th

Fun with DNS: Three Useful Commands

The DNS is a distributed, hierarchical database where authority flows from the top (or root) of the hierarchy downward.

When thinking of the structure of the DNS, imagine an inverted tree. Each branch of the tree is within a zone of authority; however, multiple branches of the tree can be within a single zone.

The software (Bind being the most common) that stores domain name information is called a domain name server. A single name server can be authoritative for multiple zones. All zones have a primary master and a secondary master name server that provides authoritative responses for their zones.

If you query a name server not authoritative for a particular zone, that name server will most likely have up-to-date information. This is because zone information propagates throughout the Internet at regular intervals, and name servers cache zone information for which they are not authoritative.

DNS Commands

(more…)

Dec
5th

HOWTO: Sync secondary and primary DNS or setup new secondary DNS

Running HELM on your Windows server?

Here is a nice little script that syncs your dns servers:

Click here

You can find more details about HELM server setup here:

HELM3

Check here

HELM4

See it here

Dec
5th

403 error with iis6 Forbidden Message

Configuring IIS 6.0 Application Pools to run CGI scripts
I’m writing this more as a reference to myself than anything else after I keep getting stuck on doing permissions correctly on IIS 6.0 servers for high-security (e.g., independant application pools for worker processes) on CGI (e.g., ActivePerl) application. I’m going to do this briefly because I’m somewhat pressured for time now, and hopefully I’ll understand my own notes later to fatten this up. Questions and comments are welcome.

(more…)