Linux System Administration

The following iptables rules should serve as a template for creating more customized iptables rules to fit desired network environment.

This article is NOT a comprehensive guide to iptables. If you are new to iptables please familiarize your self with netfilter / iptables before you use some of the iptables rules described below. This is especially recommended if you are working on a production server.

Before applying any rule make sure that you know what you are doing.

Rule: iptables to reject all outgoing network connections

The second line of the rules only allows current outgoing and established connection. This is very useful when you are login to the server vie ssh or telnet

# iptables -F OUTPUT
# iptables -A OUTPUT -m state \
--state ESTABLISHED -j ACCEPT
# iptables -A OUTPUT -j REJECT

Rule: iptables to reject all incoming network connections

The second line of the rules only allows current outgoing and established connection. This is very useful when you are login to the server vie ssh or telnet

# iptables -F INPUT
# iptables -A INPUT -m state \
--state ESTABLISHED -j ACCEPT
# iptables -A INPUT -j REJECT

Rule: iptables to reject all network connections

NOTE: This rule will drop and block all network connection whether incoming or outgoing. More importantly this will also include current ongoing established connections

# iptables -F
# iptables -A INPUT -j REJECT
# iptables -A OUTPUT -j REJECT
# iptables -A FORWARD -j REJECT

Rule: iptables to drop incoming ping requests

This iptables rule will DROP all incoming ping requests.

Read more...

If you decided to run more than one website on your Apache web server you would need to configure a VirtualHost based on the name or IP address. Here is some notes on how to achieve it. Here we assume that you have httpd package already installed on your system.

Read more...

The simplest way how to convert a ogg to mp3 files is to us oggdec command:
for file in *.ogg;do oggdec -o - "$file"|lame -h -V 4 --vbr-new - "$(basename "$file" .ogg).mp3";done

Page 14 of 73

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top