LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-13-2005, 07:32 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Blocking File Share port


Hello.

I am using IPTABLES to secure my system. I am having a problem blocking the Samba process, can someone please give me a hand?

I am able to block all incoming SSH requests to my linux server by using this command... iptables -A INPUT -p tcp --dport 22 -j REJECT This works fine.

However I am trying to do the same with the samba service. It is running samba, but I want to try and block it from everyone (just a test). I am doing this...

iptables -A INPUT -p tcp --dport 139 -j REJECT

However it still allows me to connect to the samba service and view the shares.

Can someone please tell me what I am doing wrong here?

Thanks alot

Best Regards,
Craig
 
Old 01-14-2005, 08:36 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,219

Rep: Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994Reputation: 2994
Samba ports are
UDP 137
UDP 138
TCP 139
TCP 445

BTW IMO it would be better to use a policy of dropping everything and then add rules for what you want to accept.
 
  


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
My samba share is blocking specific extensions. rpg2 Linux - Security 2 04-13-2005 10:57 AM
Port Blocking adtomar Linux - Networking 6 12-14-2004 04:35 AM
port blocking BwiNfon Linux - Security 4 09-25-2003 11:51 AM
ftp port blocking tarak4u Linux - Networking 4 09-22-2003 05:48 AM
port blocking EyaL Linux - Security 3 10-19-2002 09:58 PM

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

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