LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2003, 10:04 AM   #1
drwolfson
LQ Newbie
 
Registered: Nov 2003
Location: UK
Distribution: RH9
Posts: 16

Rep: Reputation: 0
How do I configure firewall for SAMBA?


I seem to have become the admistrator for a RH9 machine at work which is mainly used as a print/file server. So far it seems to be far more succesful than it's previous window incarnation (people can actually print and get to their files!) but as a newbie I'm having trouble setting up the firewall (it's currently off ). I need to set it up to allow SAMBA users through and I know I need to change the iptables to do it (as someone had sucessfully done this for me before I started tinkering) but I'm not sure how/what to. I've been looking round a few user groups and it seems that other people have had this type of problem, but I can't find a straight answer to it. Any suggestions?

Thanks,

DW
 
Old 11-04-2003, 10:18 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
I have to ask why you want a firewall on it..

If all it does is file/print serving, it can be considered to be in a trusted network and so long as the unnecessary services on it are all turned off, it can be secure enough.

If someone directs ports from the internet to it, then yes it needs a firewall.

SMB uses udp ports 137&138, and tcp ports 139&445.
Also make sure udp port 53 is open for dns.

A good GUI tool is Firestarter

Last edited by peter_robb; 11-04-2003 at 10:20 AM.
 
Old 11-04-2003, 10:32 AM   #3
drwolfson
LQ Newbie
 
Registered: Nov 2003
Location: UK
Distribution: RH9
Posts: 16

Original Poster
Rep: Reputation: 0
I've got the firewall up as we do have internet users, and some confidential data stored on it. Otherwise, I'd not bother!
Since posting this I've had some advice from a more local source who recomended the following commands:

iptables -I RH-Lokkit-0-50-INPUT -p udp --dport 137:138 -j ACCEPT
iptables -I RH-Lokkit-0-50-INPUT -p tcp --dport 139 -j ACCEPT


which seem to have worked. Is this a good solution, or would you recomend something else?

DW
 
Old 11-04-2003, 10:47 AM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Well, that lets anyone into the server...

You may want to add some form of ip control to select who is ok and drop the rest.

eg
iptables -I RH-Lokkit-0-50-INPUT -s my.friends.ip.address -p udp --dport 137:138 -j ACCEPT
iptables -I RH-Lokkit-0-50-INPUT -s my.friends.ip.address -p tcp --dport 139 -j ACCEPT
 
Old 11-05-2003, 06:05 AM   #5
drwolfson
LQ Newbie
 
Registered: Nov 2003
Location: UK
Distribution: RH9
Posts: 16

Original Poster
Rep: Reputation: 0
We have fairly restircted user list anyway so I'm not worried about letting any of them access this way. I think this is problem sloved... Thanks for your help,

DW (a linux convert)
 
  


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
how to configure my firewall cd1680 Linux - Security 11 03-17-2005 08:41 PM
do I need to configure firewall? totti10 Mandriva 5 10-24-2004 02:37 PM
how to configure redhat kde firewall to ONLY allow the samba roYal Fedora 2 04-09-2004 08:46 AM
How to configure the Firewall? LinuxSeeker Linux - Newbie 1 02-06-2004 11:49 AM
Please help me configure my Firewall teeno Linux - Security 3 07-01-2003 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:02 AM.

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