Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 27, 2005, 08:28 PM   #1
yg17
macrumors G5
 
Join Date: Aug 2004
Location: St. Louis, MO
Banning IPs from SMB?

I'm on a college network, and everyone connects to everyone elses computer to download stuff. Well, uh, I have some, umm, legal files shared, no illegal piracy going on here. Problem is, there are a few leeches on the network who download like 10 gigs of legal files and don't share anything in return. So, instead of allowing them to do this which then slows down my computer, I want to ban them I can use smbstatus to see who's downloading, use tcpdump to get their IP, but how would I go about banning them from connecting via SMB to my shared files? Thanks
__________________
Barack Obama is not a foreign born, brown skinned, anti-war socialist who gives away healthcare. You're thinking of Jesus.
yg17 is offline   0 Reply With Quote
Old Apr 27, 2005, 08:34 PM   #2
mnkeybsness
macrumors 68030
 
mnkeybsness's Avatar
 
Join Date: Jun 2001
Location: Moneyapolis, Minnesota
Send a message via AIM to mnkeybsness
ha ha ha... yeah... maybe your stuff is legal, but the stuff they upload isn't legal... nice try at covering yourself

Sorry, but I don't know if you can do what you want or not.
__________________
Scribbls - a collaborative drawing community designed to combine drawings into outcomes—no talent required.
mnkeybsness is offline   0 Reply With Quote
Old Apr 27, 2005, 08:40 PM   #3
DXoverDY
macrumors 6502a
 
Join Date: Apr 2005
i'm not sure of a specific thing in samba that will do this and a quick google search unveils nothing interesting, maybe my google-fu sucks tonight. You could add the IP to /etc/hosts.deny... at least that's in linux... might be something similiar ... xinetd has this ability as well
DXoverDY is offline   0 Reply With Quote
Old Apr 27, 2005, 08:40 PM   #4
gekko513
macrumors 601
 
gekko513's Avatar
 
Join Date: Oct 2003
Firewall settings ... shouldn't be too complicated, but I have never done it, so I'm not really sure.
__________________
Someone get Nekkid™, now!
gekko513 is offline   0 Reply With Quote
Old Apr 27, 2005, 09:20 PM   #5
gekko513
macrumors 601
 
gekko513's Avatar
 
Join Date: Oct 2003
I have tested the /etc/hosts.deny approach, it is used by tcpd and man tcdp says:

"The tcpd program can be set up to monitor incoming requests for telnet,
finger, ftp, exec, rsh, rlogin, tftp, talk, comsat and other services
that have a one-to-one mapping onto executable files.
"

I wastn't able to make it work for apple file sharing, but it seems to work with smb and ssh.

What you do is quite simple. The hosts.allow and hosts.deny files doesn't exist by default, but the tcpd service will start working as soon as both files are created. Open a terminal:

Create an empty allow file
sudo touch /etc/hosts.allow

Create and edit the deny file
sudo pico /etc/hosts.deny

This will start the simple editor pico that will let you edit and save the file. For each IP that you wish to block, enter a line like this:
ALL: the.ip.to.block

The ALL: means to block all services for that ip.

That's it, the "offender" should now be blocked.
__________________
Someone get Nekkid™, now!
gekko513 is offline   0 Reply With Quote
Old Apr 27, 2005, 09:53 PM   #6
yellow
Moderator
 
yellow's Avatar
 
Join Date: Oct 2003
Location: Portland, OR
Learn to use ipfw from the command line, or use BrickHouse/SunShield to control it. But your line should look like this:

deny all from 123.123.123.123 to any in

Where 123.123.123.123 is the IP of the offending party.

OR

Check out /etc/smb.conf, the smb.conf man page, and the "host deny" section.

Last edited by yellow; Apr 27, 2005 at 09:58 PM.
yellow is offline   0 Reply With Quote
Old Apr 27, 2005, 11:21 PM   #7
Westside guy
macrumors 601
 
Westside guy's Avatar
 
Join Date: Oct 2003
Location: The soggy part of the Pacific NW
You can do all sorts of interesting things with Samba. Go to samba.org and read the documentation for smb.conf.
__________________
Your post count is insufficient to view signature
Westside guy is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
24" IPS LED Backlit Monitor Advice Dr McKay Buying Tips and Advice 14 Apr 23, 2011 09:23 AM
AirPlay enabled app to access SMB share fabian9 iPhone and iPod touch Apps 0 Mar 23, 2011 05:13 PM
File transfer from SMB network slow in OSX SDAVE Mac OS X Server, Xserve, and Networking 13 Aug 4, 2009 10:54 AM
Boxee really slow to start playing file from SMB share vw412fan Apple TV and Home Theater 1 Apr 16, 2009 10:46 AM


All times are GMT -5. The time now is 07:50 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC