LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2004, 08:57 AM   #1
Howerton
LQ Newbie
 
Registered: Jul 2004
Location: Tampa, FL
Distribution: SuSe version 8.2
Posts: 21

Rep: Reputation: 15
I am trying to install a firewall for use with SuSe ver 8.2-I need someone to help me


I found a basic firewall script from this website: http://www.seifried.org/lasg/firewall/iptables.html
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Here is the script:
A very basic example
For those of you that just want to get on with it here is a simple iptables firewall script I use that is suitable for machines with one interface:

#
# First set some default policies
#

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

#
# Then block the reserved network 10.* on the external interface eth0
#

-A INPUT -s 10.0.0.0/255.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -j DROP

#
# Then we allow SSH, SMTP and DNS
#
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p tcp -m tcp --dport 22:22 -j ACCEPT
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p tcp -m tcp --dport 25:25 -j ACCEPT
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p udp -m udp --dport 53:53 -j ACCEPT
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p tcp -m tcp --dport 53:53 -j ACCEPT
#
# Now we block all incoming traffic to ports between 1 and 1024. For your system
#
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p tcp -m tcp --dport 1:1024 -j REJECT
-A INPUT -s 0.0.0.0/0.0.0.0 -d 0.0.0.0/0.0.0.0 -i eth0 -p udp -m udp --dport 1:1024 -j REJECT

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Now HOW AND WHERE do I add this script?

Is there anything that I have to change to make this script work with my distro (SuSe ver 8.2) and/or my computer and/or my broadband cable modem connection through Bright House cable/Earthlink?

I am extremely new to Linux and I have never done this before. I definately want to learn the in's and out's of Linux.

If I am confusing someone...please let me know and I will try to explain my thought process to be a little easier.

Thanks in advance for your help!!!

Bobby Howerton
 
Old 09-03-2004, 09:05 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
you can put the script in /etc/rc.d/rc.firewall.

egag
 
Old 09-03-2004, 09:15 AM   #3
Howerton
LQ Newbie
 
Registered: Jul 2004
Location: Tampa, FL
Distribution: SuSe version 8.2
Posts: 21

Original Poster
Rep: Reputation: 15
Ok,
You said to put it in this location--> /etc/rc.d/rc.firewall.

Where is this location at?

How do I get to this location to put the script there?

Are you saying that it goes inside the last portion of that location--> rc.firewall. ?

Please be detailed. this is Linux and it is all new to me....all that I have ever used is windows.
I am sorry, but i just don't understand?

Thanks

Bobby
 
Old 09-03-2004, 09:31 AM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
rc.firewall is a textfile, located in the dir : /etc/rc.d/ . if you have no firewall yet, i think this file is
empty. you can just open the file in a texteditor, and paste those lines there.
at boot, the script-lines will be executed.

if not clear, just say it..... :-)

egag
 
Old 09-03-2004, 10:47 AM   #5
Howerton
LQ Newbie
 
Registered: Jul 2004
Location: Tampa, FL
Distribution: SuSe version 8.2
Posts: 21

Original Poster
Rep: Reputation: 15
I found a basic firewall script-----but I need some help installing it!!

I think that I have 1 more question.

If I am in Linux at my KDE Desktop....how do I get to the directory: /etc/rc.d/

what do I open to get there?

what do I type in to get there?

where do you type or enter---> /etc/rc.d/

Thanks
Bobby
 
Old 09-03-2004, 11:27 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
in KDE as root, just open a file-manager-> click to /etc/rc.d ( you gotto go 1 dir up.)
then right-click on the rc.firewall-> choose 'open with'->kwrite.
then you can see if it's empty.
then you can open the downloaded file as well, and copy& paste the lines in.....

think that's it....

egag
 
Old 09-03-2004, 06:34 PM   #7
Howerton
LQ Newbie
 
Registered: Jul 2004
Location: Tampa, FL
Distribution: SuSe version 8.2
Posts: 21

Original Poster
Rep: Reputation: 15
EGAG,
I used the Konqueror Web Browser to goto the root directory and there I found the /etc/rc.d directory. Once I was there I did not find any file named rc.firewall.

What do I do now? Why was the file not there?
 
Old 09-03-2004, 06:59 PM   #8
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well... i think it's a distro-related thing, ( i use Slackware, you Suse ),
but you can also paste the lines into /etc/rc.d/rc.local. i think that file
is on all distro's and it's also executed at boot.

BTW.: there are also other solutions for a firewall, i use Guarddog but there are more options.....

egag
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Suse 8.2 and WPC11 ver 4 biggyfries Linux - Hardware 41 04-22-2005 05:40 PM
hey bruno buys..I need your help with installing a firewall in my SuSe ver 8.2 distro Howerton Linux - Newbie 3 09-03-2004 09:50 PM
Is it possible to remove and re-install YAST in SUSE VER 8? Tazzmanian Linux - Software 1 08-09-2004 07:19 AM
WPC11 ver 4 / SuSe 9.0 jamescov Linux - Networking 2 11-17-2003 09:47 PM
suse 8.2 and wpc11 ver 3 sdkvang Linux - Networking 10 11-16-2003 10:38 PM


All times are GMT -5. The time now is 06:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration