Monday, December 19, 2011

Launchpad

https://launchpad.net/ is a software collaboration platform. It's a unique collaboration and hosting platform for software projects. It brings communities together — regardless of their choice of tools — by making it
easy to share code, bug reports, translations and ideas across projects.

Monday, December 12, 2011

Egrep, Find, Iptables

Search for errors in logfiles.
sudo egrep '(warning | error | panic | fatal):' /some/dir/* | more

Find a file.
find / -name some.file -print 2>/dev/null

Show iptables current status.
iptables --list-numbers -n -L

Friday, December 9, 2011

Iptables

Here's a great tutorial on CentOS / Redhat Iptables Firewall Configuration, http://www.cyberciti.biz/faq/rhel-fedorta-linux-iptables-firewall-configuration-tutorial/.


Turn On Firewall

chkconfig iptables on
service iptables start
# restart the firewall
service iptables restart
# stop the firewall
service iptables stop



Display Default Rules
iptables --line-numbers -n -L




Understanding Firewall
There are total 4 chains:




INPUT - The default chain is used for packets addressed to the system. Use this to open or close incoming ports (such as 80,25, and 110 etc) and ip addresses / subnet (such as 202.54.1.20/29).
OUTPUT - The default chain is used when packets are generating from the system. Use this open or close outgoing ports and ip addresses / subnets.
FORWARD - The default chains is used when packets send through another interface. Usually used when you setup Linux as router. For example, eth0 connected to ADSL/Cable modem and eth1 is connected to local LAN. Use FORWARD chain to send and receive traffic from LAN to the Internet.
RH-Firewall-1-INPUT - This is a user-defined custom chain. It is used by the INPUT, OUTPUT and FORWARD chains.


Learn more about iptables here.

Tuesday, December 6, 2011

One-liners

Today, while researching linux cheat sheets, I stumbled upon the website http://cb.vu/unixtoolbox.xhtml. It's a compilation of quick one line commands for Linux and UNIX variants. This is how I create my own sheets, short, concise, & easy to read. Thanks Colin.