Miscellaneous > Programming & Networking

iptables firewall

(1/3) > >>

Master of Reality:
is there anyway to get the line number of errors in a bash script? i've looked through this script for a while looking for where this stuff is:

--- Code: ---
--- End code ---
i picked up thios script from some website and modifed it, but does anyone see anything wrong with this script?:

--- Code: ---
--- End code ---

[ December 05, 2002: Message edited by: The Master of Reality / B0B ]

flap:
The variable EXTERNAL isn't declared.

Where you have lines like:

$IPTABLES -A INPUT -i $EXTERNAL -p tcp --dport swat -j DROP

you should presumably have $EXTERNALIF instead of $EXTERNAL

voidmain:
I don't know what your goal is but if this is a RedHat machine (even if it isn't) I have found that webmin makes an outstanding iptables configurator. In RedHat as you know the iptables service script is /etc/init.d/iptables. That script can/will save your current iptables rules in a configuration file called /etc/sysconfig/iptables. It loads the rules from that table when you start the iptables service. Webmin is a nice graphical interface to configure the firewall. Be careful so you don't set a rule to shut you out of webmin though or you will have to go to the console to undo the rule that has blocked you out.

If you already know this stuff just ignore it. Maybe you have another reason to use a script for above/beyond type of configuration. The webmin way is nice, neat and clean and uses the system's predefined way of setting up your firewall.

[ December 05, 2002: Message edited by: void main ]

Master of Reality:
paranoia is my main reason, . my other reason is just for fun  

and as yu can see how i've set taht script that its not redhat.

Kintaro:
Just because your paranoid, doesnt mean there not after you! -Nirvana

Navigation

[0] Message Index

[#] Next page

Go to full version