Quote:
How come the above is not similar to the one I have?
|
Because the one you have is a command (that one would type in a shell) that appends a rule to iptables, rather than a line from a configuration file. See the iptables manpage for more details.
The configuration file that you have provided has the exact same syntax as one saved using the iptables-save utility (which comes with iptables).
Quote:
Also, if I wanted to modify my default iptable and add my own rules to it, do I do something like this?
|
No. Notice that in the original file, none of the lines begin with "iptables".
If you want that rule to be added to your configuration file (given that that configuration is already loaded into iptables), just do (from the command line):
Code:
iptables -A FORWARD -d 207.46.104.20 -j REJECT
iptables-save > FILE_CONTAINING_IPTABLES_RULES
Quote:
should I restart the computer for it to apply it's changes
|
Under Linux, unless you want to use a newly compiled/installed kernel, you should never need to restart your computer in order for some change to take effect.
If you've run the iptables command to append the rule, then the firewall has already been updated with your changes.
If you have manually edited the configuration file, just run:
Code:
iptables-restore < FILE_CONTAINING_IPTABLES_RULES
and the firewall will be updated accordingly.