Main Menu

friends

Banner

Latest articles

XEN on fedora 8 - part 1: the basic setup
02/03/2009 | mad mad mod

This article describes how to install and use the XEN Hypervisor on Fedora Linux 8. I use Fedora Linux as host operating system (Domain 0) and I use Fedora as operating system for the paravirtualized  [ ... ]


convert mysql table from MyISAM to InnoDB
30/12/2009 | mad mad mod

MyISAM is the default storage engine for MySQL. Unfortunately it doesn't support transactions or foreign keys (but it has some other nice features like compression). However, because InnoDB does su [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
setting up a very simple firewall (Fedora) E-mail
Security

This article describes how to set up a very simple desktop-firewall on Linux (Fedora).

 

Step 1: make sure iptables is installed on your system:

# rpm -qa | grep iptables
iptables-1.4.1.1-1.fc8

 

If iptables is not installed, you can install it with

 

# yum install iptables

 

Step 2: make sure iptables starts automatically at bootup:


# chkconfig --list iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off

 

If it is not switched on in runlevel 2, 3, 4 and 5:

# chkconfig --level 2345 iptables on

 

step 3: start iptables

# service iptables start

 

step 4: delete all firewall rules

 

# iptables --flush

 

step 5: create new rule-set

We will create a new user-defined "chain" and we will call it "MYRULES".

  • We accept all outgoing traffic
  • We accept local loopback device traffic
  • We accept packets from outside if we have started the connection or the connection is related with an existing connection (e.g. ftp data transfer)
  • We drop and log all other incoming packets

 

  

# iptables -N MYRULES

# iptables -A INPUT -j MYRULES
# iptables -I INPUT 1 -i lo -p all -j ACCEPT

# iptables -A MYRULES -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -A MYRULES -j LOG
# iptables -A MYRULES -j DROP

 

step 6: save the new firewall rules

 

 

# iptables-save > /etc/sysconfig/iptables

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting