Bulk Lookup Owner of IP Address

To perform a bulk whois lookup of a list of IP addresses use the following script: Bulk whois lookup while read ip; do if [ ! -z "$ip" ]; then echo -n "$ip - " && whois $ip 2>/dev/null grep "Organization" -m 1; fi; done < ip_list.txt Example input (ip_list.txt) 172.217.8.206 172.217.8.203 172.217.8.266 151.101.65.67 Output... » read more

tmux horizontal window splitting

To split terminal in to four horizontal tmux windows you can run the following code: #!/bin/bash tmux new-window -a -n WinSplit tmux new-session -d -s WinSplit tmux selectp -t WinSplit tmux split-window -v tmux set-window-option -g window-status-current-bg blue tmux split-window -v tmux split-window -v tmux select-layout even-vertical tmux attach -t WinSplit The result is something... » read more

Modify ip-tables directly in ubuntu

To modify ip-tables directly in ubuntu First save off your current config: $ sudo -s $ iptables-save > /root/working.iptables.rules $ iptables-save > /root/working.iptables.rules.to.modify At this point you can modify the file.  Once your are satisfied restore it # iptables-restore < /root/working.iptables.rules.to.modify  

Configure postfix with Gmail via Webmin

Configure postfix with Gmail via Webmin This assumes the user has webmin installed and understands how to log in and use it. (Usually bring it up in a browser at https://localhost:10000 ) Make sure that postfix is installed. In Webmin this is done by going to “System”, “Software Packages” then clicking on “Package from APT” and... » read more

useful active directory scripts

Scripts to manage Active Directory Users Appending a Multi-Valued Attribute Appending a Phone Number Adding a Route to the Dial-In Properties of a User Account Adding a User to Two Security Groups Appending Address Page Information for a User Account Appending a Home Phone Number to a User Account Assigning a Published Certificate to a... » read more

Red Hat Linux cheat sheet commands examples RHEL

Useful Linux Commands (Red Hat) (http://www.cse.buffalo.edu/~eisner/DLW) Revised 3/1/2000 Getting information man commandname display the manual page for a particular command named commandname man -S sectionnumber commandname display the manual page under a specific section numbered sectionnumber for the command named commandname. Sometimes the same command will exist in more than one section. man alone will... » read more

freebsd find

How to find files, programs, etc using freebsd The locate command is good for finding files and directories. Enter something similar to: locate someprogram | more If that doesn’t work, perhaps try the whereis or find commands: whereis someprogram | more find / -name "someprogram*" For variations on these commands, you can type: man locate... » read more