Computer Stuff

From Stu2
Jump to navigation Jump to search

Mapping outgoing firewall rules

Sometimes, I can't reach a site and I have no idea why. A firewall may be the cluprit. So I need a method for discovering intermediate firewalls and the outgoing firewall rule sets. For the most part, ICMP is allowed, so I thought I would try 'hping2.' HPING runs on Linux and windows. Although, I wasn't able to make it run on XP SP1.So I used BackTrack and VMWARE. HPING comes on the BackTrack CD. VMWARE let's me boot into Linux without closing down windows.

Assume the network looks like this:

WS ---> Rtr1 ---> Rtr2 ---> FW ---> Rtr3 ---> Internet

Using traceroute, I can discover the IP addresses for each router. For example:

traceroute -n

Count the number of hops to the first router on the other side of the firewall. (Rtr3 in the diagram above.) Use hping to send SYN packets towards a host on the Internet; using the port in question and incrementing the TTL.(Note, if you are familiar with the hping response, you can simply use the number of hops. For the first time, try incrementing the number of hops to see the reply.)

hping -p 80 -S -n -t 4

If the port is allowed through the firewall, you will see an ICMP Time out Exceeded message bounce back. If the port is closed, there won't be a reply.

This isn't anything new, it's just a manual implementation of firewalk. However, I needed something simple and this does the trick.

Incidentally, I discovered using an Ack packet may solicit a response with LAN like RTTs. If this is the case, the first router is most likely a NAT router or firewall. For example:

hping -p 80 -A -n -t 4

... will return RTTs of 1-2ms, if there is a stateful device on the next hop.

--Stu 19:58, 17 October 2006 (EDT)

Gnome Menus

There are three places to look:


Edit to add or modify the Applications menu on the upper panel. This is a XML file which points to another file in the /usr/share/desktop-directories directory. The file also specifies the categories, which are used in the *.desktop files.

The desktop-directories files (*.directories) provide the name which is used in the actual pull down menu.

Edit the *.desktop file to specify the category (and thus the location in the menu) and the command to launch the file.

Perl - upgrade

After you update perl, run

perl-cleaner modules

This will rebuild all the perl modules so they use the new version.I discovered this was necessary when I tried to run (mining the dx cluster) and it complained about DBD::mysql.