IP/MAC Scanner from Linux Command Line?

I use IP Scanners all the time.  Angry IP and IP Scanner Pro are great GUI applications for Windows, OS X, and Linux.  But what if you’re only option is a linux command line?  NMAP is here to the rescue! If you want to scan an IP range for MAC and IP Addresses that are … Continue Reading

Segmenting Datacenter Servers (Security and Performance)

In data center networking, you really don’t care what is hosted on a server. Let’s face it. You know it’s true. Some business unit probably calls this app “critical”. It probably generates a report that 3 people in the company see. But it’s important to them. To you, it’s a VLAN, an IP address, a … Continue Reading

Update JUNOS Config with Remote API slax/juise

Mike over at High on PHP recently showed everyone the coolest thing in the world …. How to run SLAX on JUNOS boxes remotely with JUISE…. Seeing this in action nearly made me pee my pants! Too COOL! I went through his setup with ease…once I upgraded my Linux distribution.  (It requires curl libraries that were … Continue Reading

Show the entire contents of a file in Linux/Ubuntu/Mac

I’m primarily a Juniper engineer, so most of my commands are followed by ” | no-more”. If you’re like me, you probably like to print the entire contents of files/output and scroll up within the terminal. There’s a super easy command that will print the contents of a file to the screen. “cat” cat output.txt

Find files with matching content in Linux/Debian/Mac

Sometimes you have need to find all files with certain words in them.  If you’re on Linux/Debian/Mac, you can run a really simple command to find them! That command is “grep”. Here’s an example that recursively searches subfolders for “set groups node1” grep -iR ‘set groups node1’ * Here is the output:

How to make a static IP address in Ubuntu

If you have a new install of Ubuntu/Debian, you’ll notice that eth0 is always set to “DHCP”.  While this is fine and dandy for user environments, out there in the server world, we like static IP addresses. First thing’s first…. open the /etc/network/interfaces file. sudo vi /etc/network/interfaces Next, you want to change the eth0 DHCP setting … Continue Reading

Split large text files in Mac/Nix

Lets say you have a file full of passwords that is 62,000 lines and you want to chop the file into bite-sized pieces. There is an easy terminal command to help you with that! To split into multiple 1000 line files with a prefix of “SPLAT” here is the command: split -l 1000 textfile.txt SPLAT

Update $PATH variable on Mac Permanently

If you’re a developer or you commonly run apps from directory locations other than the default Mac locations, you probably hate typing out the full directory when running the app or script. To update the $PATH variable within the Terminal you just need to type: export PATH=/new/path:$PATH To update the $PATH variable PERMANENTLY you just … Continue Reading

Setup vsftpd on Linux

Most vanilla installs of Linux don’t come with an FTP server. There’s a really easy way to remedy that when your server has internet access! Just install vsftpd! First you install it: yum install vsftpd Then you edit the config file cd /etc/vsftpd vi vsftpd.conf Then you change the root directory: local_root=/ftp Then you start … Continue Reading