LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-19-2004, 08:09 AM   #1
johnny1959
LQ Newbie
 
Registered: Feb 2004
Location: Hannover, Germany
Distribution: Suse 9.0 / KDE 3.1
Posts: 23

Rep: Reputation: 15
Samba: How to restrict access to server via MAC-address?


Hi,

I know the Samba setup command

host allow [IP-address]

to restrict access to the Samba-server by IP-addresses.

I've just set up a WLAN-Access Point in my home-network and the router works in the DHCP-mode in the wireless part. That means IP-addresses of machines logged in on the wireless path do change. So I'm asking myself if there's a possibility to manage access permissions via hardware MAC-addresses, anything like

mac allow [MAC-No. of Network-Interface]

Couldn't find anything in the forums or on the internet. Someone out there with an idea?

Thanks.

Johnny
 
Old 09-19-2004, 08:32 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,698

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Not that I know of. But you can restrict access via username. When samba is configured for security = user if you do not add a smb password then that user does not have access. What OS are the other PCs running?
 
Old 09-19-2004, 09:38 AM   #3
johnny1959
LQ Newbie
 
Registered: Feb 2004
Location: Hannover, Germany
Distribution: Suse 9.0 / KDE 3.1
Posts: 23

Original Poster
Rep: Reputation: 15
All other PC are Windoze. I know I have a password option (though I never managed to make it work with Windows machines) but I would prefer a setup without having to type passwords. MAC address would be perfect. I'm thinking about sharing my WLAN broadband access with my neighbor and I just want to keep him out of my server without typing passwords myself every time I want to get in.

Johnny
 
Old 09-19-2004, 01:14 PM   #4
vald
LQ Newbie
 
Registered: Sep 2004
Location: Bulgaria
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
I think you can map mac address with ip-address in dhcp server and restrict access to your samba server only to your IPs...
or restrict dhcp server to stop lease some ip-addresses and use it as static addresses on boxes that must access your samba server.but I think is imposible to instruct samba to work with client's mac adress...


P.S. Sorry for my bad english, I just try to help
 
Old 09-19-2004, 01:42 PM   #5
johnny1959
LQ Newbie
 
Registered: Feb 2004
Location: Hannover, Germany
Distribution: Suse 9.0 / KDE 3.1
Posts: 23

Original Poster
Rep: Reputation: 15
Okay,

Michaelk and Vald offer some workarounds, but say it's impossible to work with MACs themselves. Thanks, folks. Negative answer is an answer also. Anyone else who thinks he can throw in something? Or shall I send a note to the Samba folks to add to the wishlist?

Johnny
 
Old 03-27-2008, 04:43 AM   #6
ploaie
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Thumbs up i made something

my firewall:

iptables -F
iptables -A INPUT -m mac --mac-source 00:01:6C:18:A5:EA -s 192.168.0.220 -j ACCEPT
iptables -A INPUT -m mac --mac-source 00:06:29:29:B3:36 -s 192.168.0.233 -j ACCEPT
iptables -A INPUT -j DROP

in smb.conf

host allow= 192.168.0.220,192.168.0.233

the servere drops every connection if the ip is not matching that MAC from the firewall rules. It seems to work for me... tell me if it works for you.

sorry for my bad english
 
  


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
restrict server access by mac address? stinkpot Linux - Software 4 11-22-2005 07:05 AM
Can I deny access based on mac or IP address with shorewall? enigma_0Z Linux - Networking 1 06-02-2005 04:15 PM
Restrict X server access using /etc/security/access.conf anand_kt Linux - General 0 04-22-2005 08:40 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
couple C++ questions - mac address & last file access time. BrianK Programming 3 07-17-2002 03:17 AM

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

All times are GMT -5. The time now is 06:56 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