LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   how to generate iptables script using fwbuilder (https://www.linuxquestions.org/questions/linux-security-4/how-to-generate-iptables-script-using-fwbuilder-173605/)

Skunk_Face 04-23-2004 02:45 AM

how to generate iptables script using fwbuilder
 
can someone plz tell me how i can create an iptables bash script from fwbuilder. Its my first time using fwbuilder so plz forgive me if i've missed something...ok heres what i did

#fwbuilder

used the rules/help me build firewall policy ...entered all the details (ie. interface details) then i proceeded to compile rules/compile.

This generated 2 files in my /firewall folder ( ie. firewall.fw and *.xml)

now in a separate console i type

#fwb_install -f *.xml
Objects Firewall/*.xml not found

what am i doing wrong here?

gundelgauk 04-23-2004 10:06 PM

The two files you get seem ok to me.

The .xml file is the save file from fwbuilder and the .fw one should be a shell script which loads modules, settings and the actual firewall rules.

Make the .fw file executable, for example
Code:

chmod +x firewall.fw
Then execute it as root
Code:

su -c './firewall.fw'
You should be prompted for the root password and after you enter it, the script will be executed. By now your firewall should be up and running. You can verify this, for example
Code:

iptables -L | less


All times are GMT -5. The time now is 01:10 PM.