LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-12-2010, 04:28 AM   #1
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Where is the iptables configuration file for slackware?


Where is the iptables configuration file for slackware?
 
Old 04-12-2010, 04:52 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
There isn't one.

'/etc/rc.d/rc.firewall' is called from '/etc/rc.d/rc.inet2' on boot and is the normal place to put firewall configuration.

NB 'rc.firewall' does not exist unless "you" create it.
 
Old 04-12-2010, 04:52 AM   #3
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
There isn't one.

'/etc/rc.d/rc.firewall' is called from '/etc/rc.d/rc.inet2' on boot and is the normal place to put firewall configuration.

NB 'rc.firewall' does not exist unless "you" create it.
 
1 members found this post helpful.
Old 04-12-2010, 04:53 AM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,691

Rep: Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377
here is a good iptables firewall generator for slackware, courtesy of Alien Bob

http://connie.slackware.com/~alien/efg/
 
1 members found this post helpful.
Old 04-12-2010, 05:08 AM   #5
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Original Poster
Rep: Reputation: 65
Quote:
Originally Posted by wildwizard View Post
There isn't one.

'/etc/rc.d/rc.firewall' is called from '/etc/rc.d/rc.inet2' on boot and is the normal place to put firewall configuration.

NB 'rc.firewall' does not exist unless "you" create it.
If i do
Code:
iptables --list
get some default configuration.
Trying to find that file with this default configuration.
 
Old 04-12-2010, 05:12 AM   #6
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by cola View Post
If i do
Code:
iptables --list
get some default configuration.
Trying to find that file with this default configuration.
You have installed something then.

This is a fresh Slackware install :-

Code:
root@indigo:/etc/rc.d# iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
Old 04-12-2010, 06:32 AM   #7
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Original Poster
Rep: Reputation: 65
Quote:
Originally Posted by wildwizard View Post
You have installed something then.

This is a fresh Slackware install :-

Code:
root@indigo:/etc/rc.d# iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
I get this:
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
LOG        udp  --  anywhere             anywhere            udp dpts:0:1023 LOG level warning
LOG        tcp  --  anywhere             anywhere            tcp dpts:0:1023 LOG level warning
DROP       udp  --  anywhere             anywhere            udp dpts:0:1023
DROP       tcp  --  anywhere             anywhere            tcp dpts:0:1023
LOG        tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning
DROP       tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
DROP       icmp --  anywhere             anywhere            icmp echo-request

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
Old 04-12-2010, 10:14 AM   #8
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
post deleted

Last edited by harryhaller; 04-12-2010 at 12:03 PM. Reason: no longer necessary
 
Old 04-12-2010, 11:29 AM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by cola View Post
I get this:
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
LOG        udp  --  anywhere             anywhere            udp dpts:0:1023 LOG level warning
LOG        tcp  --  anywhere             anywhere            tcp dpts:0:1023 LOG level warning
DROP       udp  --  anywhere             anywhere            udp dpts:0:1023
DROP       tcp  --  anywhere             anywhere            tcp dpts:0:1023
LOG        tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning
DROP       tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
DROP       icmp --  anywhere             anywhere            icmp echo-request

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Do you have an /etc/rc.d/rc.firewall file? As wildwizard said, that is the default place for a firewall in Slackware. By the way, from that output you really don't have a firewall in place. All the defaults are set to ACCEPT. The rules you've got just close down port 1023 (although I have no idea what might be running there) and some settings that are likely just there to frustrate some scanning techniques. I really wouldn't count on that firewall doing much of anything security-wise.
 
Old 04-12-2010, 02:53 PM   #10
botnet
Member
 
Registered: May 2009
Posts: 158

Rep: Reputation: 40
probably not the official method, but i create a set of rules manually, then use iptables-save > /etc/iptables.rules, then put iptables-restore /etc/iptables.rules in /etc/rc.d/rc.local

been working for the last few years that i've done this

here is my iptables.rules file if it helps: http://pastebin.com/uiMZmPsk
 
Old 04-13-2010, 06:36 AM   #11
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Original Poster
Rep: Reputation: 65
Quote:
Originally Posted by Hangdog42 View Post
Do you have an /etc/rc.d/rc.firewall file? As wildwizard said, that is the default place for a firewall in Slackware. By the way, from that output you really don't have a firewall in place. All the defaults are set to ACCEPT. The rules you've got just close down port 1023 (although I have no idea what might be running there) and some settings that are likely just there to frustrate some scanning techniques. I really wouldn't count on that firewall doing much of anything security-wise.
There is not /etc/rc.d/rc.firewall file.
 
Old 04-13-2010, 07:13 AM   #12
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by cola View Post
There is not /etc/rc.d/rc.firewall file.

Then something along the lines of what botnet suggested might be true in your case. These rules have to be stored in a file somewhere, so it is probably time to do some digging.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
On what basis CHAIN integer values are generated in IPtables under iptables file? haariseshu Linux - Server 3 11-05-2009 04:25 AM
iptables configuration file linderox Linux - Server 2 11-26-2007 01:55 AM
[B]which file has the configuration of iptables in slackware?[/B] eder_michael11 Linux - General 1 04-17-2006 12:03 PM
Slackware 10.1 and iptables configuration help houler Linux - Security 25 05-11-2005 05:21 PM
Read Iptables configuration file hoarenet Mandriva 2 07-15-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration