Unix Technical Forum

MAC address match based access to a server running Slack 10.1 ?

This is a discussion on MAC address match based access to a server running Slack 10.1 ? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi I am using iptables for my firewall on this server which is meant to act as a samba ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 06:36 AM
Madhusudan Singh
 
Posts: n/a
Default MAC address match based access to a server running Slack 10.1 ?

Hi

I am using iptables for my firewall on this server which is meant to act as
a samba file server for a bunch of windows xp machines (any good references
for that, I have seen the the uky.edu link ?), and a mailserver.

I wish to limit ssh and samba access to this machine based on the MAC
address of machines. The problem is that all these machines get their IP
address via DHCP from some other server, so I cannot use their current IP
addresses to write the rule.

Is the above possible ? If so, how ?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 06:36 AM
Dances With Crows
 
Posts: n/a
Default Re: MAC address match based access to a server running Slack 10.1 ?

On Tue, 01 Mar 2005 18:56:48 -0500, Madhusudan Singh staggered into the
Black Sun and said:
> I am using iptables for my firewall on this server which is meant to
> act as a samba file server for a bunch of windows xp machines. I wish
> to limit ssh and samba access to this machine based on the MAC address
> of machines. The problem is that all these machines get their IP
> address via DHCP from some other server, so I cannot use their current
> IP addresses to write the rule.
>
> Is the above possible ? If so, how ?


"man iptables" suggests:

--mac-source [!] address
Match source MAC address. It must be of the form
XX:XX:XX:XX:XX:XX. Note that this only makes sense for packets
coming from an Ethernet device and entering the PREROUTING, FOR-
WARD or INPUT chains

....combine a bunch of those with the destination-ports you wish to allow
and -j ACCEPT , you're in business. Hope the MACs don't change. HTH,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 06:36 AM
cashmir
 
Posts: n/a
Default Re: MAC address match based access to a server running Slack 10.1?

Madhusudan Singh wrote:
> Hi
>
>
> I wish to limit ssh and samba access to this machine based on the MAC
> address of machines. The problem is that all these machines get their IP
> address via DHCP from some other server, so I cannot use their current IP
> addresses to write the rule.


if you use dnsmasq as dhcp/dns server, you can bind MAC-adresses to
ip-numbers.
so, the machines that must be able to use certain ports, can be given
allways the same ip.

just take a look at /etc/dnsmasq.conf.
it has many examples.

cashmir
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 06:36 AM
Madhusudan Singh
 
Posts: n/a
Default Re: MAC address match based access to a server running Slack 10.1 ?

cashmir wrote:

> Madhusudan Singh wrote:
>> Hi
>>
>>
>> I wish to limit ssh and samba access to this machine based on the MAC
>> address of machines. The problem is that all these machines get their IP
>> address via DHCP from some other server, so I cannot use their current IP
>> addresses to write the rule.

>
> if you use dnsmasq as dhcp/dns server, you can bind MAC-adresses to
> ip-numbers.
> so, the machines that must be able to use certain ports, can be given
> allways the same ip.
>
> just take a look at /etc/dnsmasq.conf.
> it has many examples.
>
> cashmir


Sorry if I did not make it amply clear in my initial post. I have no control
over the DHCP server.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 06:36 AM
James McIninch
 
Posts: n/a
Default Re: MAC address match based access to a server running Slack 10.1 ?

http://www.samba.org is a good reference for SAMBA

To filter based on MAC address, use the --mac-source option to iptables. It
should be pointed out that the MAC address is spoofable (it can be set by
the user), so user-based authentication is a better idea.

Madhusudan Singh wrote:

> Hi
>
> I am using iptables for my firewall on this server which is meant to act
> as a samba file server for a bunch of windows xp machines (any good
> references for that, I have seen the the uky.edu link ?), and a
> mailserver.
>
> I wish to limit ssh and samba access to this machine based on the MAC
> address of machines. The problem is that all these machines get their IP
> address via DHCP from some other server, so I cannot use their current IP
> addresses to write the rule.
>
> Is the above possible ? If so, how ?
>
> Thanks.


--
Remove '.nospam' from e-mail address to reply by e-mail
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com