Linux distribution Fedora 9 or FC9 see article: Webmin - Configure IPTables Firewall - Fedora FC9
With a Linux distribution Fedora 8 or FC8.
With Webmin to click on the icon Networking then Linux Firewall, the loading of the rules take a few seconds and one obtains a following table:
For the following peripherals and services:
DNS for Bind Domain Name Server, port 53.
HTTP for Apache Web server, port 80 and 443 to be useful in SSL.
FTP for ProFTPd sever, port 21.
SSH for OpenSSH, port 22.
SMTP for Postfix or Sendmail, port 25.
eth0, eth1, eth2... etc, which is the network lan adapters, very important if the station or the waiter is behind a router or uses a network SMB.
|
| Incoming packets (INPUT) |
| Select all. | Invert selection. |
|
| Select all. | Invert selection. |
|
|
|
| Forwarded packets (FORWARD) |
| Select all. | Invert selection. |
|
| Select all. | Invert selection. |
|
|
|
| Chain RH-Firewall-1-INPUT |
| Select all. | Invert selection. |
|
|
| Select all. | Invert selection. |
|
|
The respect it order of the rules is of primary importance, it is not for nothing, that one can up them or descend them!
Add the new rule, simplest is to click on Accept line concerned, for example that of the interface of entry is lo, then to publish an identical rule with the button "Cloner the rule" which is in bottom of the form, to change the interface of entry lo for example eth1, to safeguard this new rule and to assemble it in the list.
Rules File of Firewall /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i eth1 -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
# Generated by webmin
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
Warning to the syntax of this file /etc/sysconfig/iptables
|