Here are explanations for some of the iptables options you will see in this tutorial.Don't worry about understanding everything here now, but remember to come back and look at this list as you encounter new options later on.To enable access to an HTTP web server, use the following command.As per basic firewall behaviour, the rules are read in the order they are listed on each chain, which means you’ll need to put the rules in the correct order.Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 192.168.0.4 anywhere 2 ACCEPT tcp -- anywhere anywhere tcp dpt:https 3 ACCEPT tcp -- anywhere anywhere tcp dpt:http 4 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh This command saves current rules to system configuration file which is used to reconfigure the tables at the time of reboot.
Ubuntu 8.04 Comes with ufw - a program for managing the iptables firewall easily.
The protocol refers to the networking protocol of packets you want to filter.
You can also specify the port, no of the port on which you want to filter the traffic.
in the command translates to the port number 22, which the protocol uses by default.
The same command structure can be used to allow traffic to other ports as well.
Search for updating iptables:
Firewalls can commonly be configured in one of two ways, either set the default rule to accept and then block any unwanted traffic with specific rules, or by using the rules to define allowed traffic and blocking everything else.