How to Find Public IP Address from CLI

Often, an IP address is hidden behind a proxy or NAT. Here is how you can tell the public IP:


Perl MIME::Base64

Base64 Encoding allows you to convert a binary file into a text message. Sometimes binary is not allowed to be transmitted. Whatever your reason, here is how you create a Base64 encoded file using Perl:


Blue Coat Packet Capture

The Blue Coat Proxy / Filter device transfers packets like any other network device. A simple troubleshooting technique is to see if the packets are flowing through the device as expected. Here are the commands to do a Blue Coat Packet Capture:


Bash Script Thumbnail

I wanted something to quickly take a bunch of images and make a gallery page. The linux binary convert and a Bash Script to create thumbnails did the trick:


tcpdump filters

A common step in troubleshooting is finding out what not to troubleshoot. With a packet capture you can confirm things such as routing, firewall rules, and remote services.


Network Troubleshooting With Telnet

Using Telnet to Test Open Ports

The Setup on

  • 5555 is blocked via a firewall
  • 80 is open and running http service
  • 22 is open and running ssh

How to Manually Use Telnet

Typing anything and then hitting enter is like sending protocol information to the remote service. If you know the protocol and it accepts ascii, you can manually interact. If not, it will give you an error message. You can’t type binary data this way though.

Example of Telnet Error Message

	C:\>telnet 22

telnet protocol mismatch

Example of Manually Typing ASCII protocol

	C:\>telnet 80
	GET /index.php HTTP/1.1

testing http with telnet

Example of Blocked Port:

	C:\>telnet 5555

telnet connect failed

No Service exists on server:

For example, the database team wants to test if they can get to on port 8888, however, the server isn’t provisioned yet – but they still want you to test! In this example, I have opened the firewall to port 8888, but there is nothing listening on that port. Compare to the “blocked port” above to see the difference.

    C:\>telnet digitalcrunch 8888
    Connecting To not open connection to the host, on port 8888: Connect failed

Disable Windows Firewall

The windows firewall is actually pretty good at blocking inbound traffic, and even outbound traffic if configured properly. The interface is horrible though! You can get to the control panel by typing wf.msc, but you can also disable windows firewall from the cli. Here are some other useful commands:


Cisco Show Log Command

This is such a simple cisco command, and I debated about actually making a post for it, but I know I’ll forget the syntax when I need it. I hope it helps you too:

Check Point Debian

Enable IP Forwarding

By default, Checkpoint firewalls will not let pings pass through them. However, when you first setup a network, it’s useful to be able to test wide open through the firewall to verify routing and connectivity. Here is how to enable IP forwarding.

Check Point

Find UTM-1 Check Point Appliance Model from CLI

You’ve been given the task of working on a firewall – but unfortunately the old admin never took notes, there is no documentation, and the physical UTM-1 Appliance is in another country. So… what the heck is it? Here is how to find out what type of UTM-1 or Power-1 Appliance you have in the datacenter (or closet) from the command line: