Linux Server How ToHow To Setup, Configure, Manage and Secure a Linux Server |
|
Home Which Linux Distribution? Linux Server Hardware Linux Server Security Linux Server Security Linux Server Firewalls Easy Firewall Generator IPTABLES Firewall Tutorial Ubuntu Server Firewall Secure Passwords Install John the Ripper Keep Your Server Updated Linux Web Server - Apache Linux DNS Server - Bind Linux DHCP Server - DHCPD Linux Mail Server - Sendmail LDP How To's About This Site |
Linux Server Security - Linux Server FirewallsLinux Server FirewallsA firewall is software that performs packet filtering, allowing the server administrator to determine what packets of data are accepted or rejected from a given network interface based on criteria such as source, destination, protocol and other specifics found in the headers contained in the packet of data. The ability to filter which packets of data are accepted provides a measure of protection against unsavoury elements who may attempt to exploit or compromise your Linux server.The software most commonly used to provide a firewall on a Linux computer is iptables, which is part of the packet filtering framework inside the Linux 2.4.x and 2.6.x kernel series produced by the netfilter.org project. Netfilter, ip_tables, connection tracking (ip_conntrack, nf_conntrack) and the NAT subsystem together build the major parts of the framework allowing your Linux server to perform stateful and stateless packet filtering, network address translation and network address port translation. Netfilter/iptables allows the Linux server administrator to build firewalls, use NAT and masquerading for internet connection sharing, use NAT to implement a transparent proxy and more.
Configuring your Linux Server FirewallYour firewall rules are usually contained in a firewall script that is executed when the Linux server first boots up. The name and location of this script will depend on your Linux distribution, on Slackware Systems it will be called rc.firewall and on Redhat servers it is usually simply called iptables. If you are unsure as to what to call it or where it should go on the vast majority of Linux systems you can call it whatever you like, say /etc/rc.d/rc.firewall, chmod 700 it to make it executable and start it by adding it to rc.local.To assist you in configuring your Linux server firewall we have included Oskar Andreasson's fantastic Iptables Tutorial which provides an incredibly detailed insight into how a firewall works and includes example firewall scripts that you can study and even adopt to suit your Linux server. Some Linux distributions include tools that are designed to simplify the configuration of your firewall such as Ubuntu's ufw firewall configuration tool. We shall take a quick look at ufw on the Ubuntu Server Firewall page to see how it works and how to use it. These resources will help you on your way to understanding iptables/netfilter at a higher level but there are times when we need a firewall and we need one faster than we can learn how to make one (or we dont want to learn how to make one). If this sounds like you then there are a number of tools available that you can use to create your firewall without having to roll up your sleeves. The Easy Firewall Generator provides an excellent IPTables firewall script in seconds that will work immediately the vast majority of the time without any modification. Credit for the Easy Firewall Generator we host on linuxserverhowto.com goes to its creator, T. S. Morizot. Many thanks Scott! Firestarter is a free, open source graphical firewall configuration tool that is powerful and easy to use. It is suitable for use on servers, desktops and dedicated gateways. Shorewall is free to use and once installed on your server will assist you by helping you configure and generate a firewall script. |
| © 2009 www.linuxserverhowto.com |