Koozali.org: home of the SME Server

restriction of access

Offline sal1504

  • ****
  • 149
  • +0/-0
restriction of access
« on: October 25, 2009, 01:04:54 AM »
is there a way to restrict access to smeserver 7.4 by a computers mac address?

sal1504

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: restriction of access
« Reply #1 on: October 25, 2009, 02:16:43 AM »
is there a way to restrict access to smeserver 7.4 by a computers mac address?

No.

Offline sal1504

  • ****
  • 149
  • +0/-0
Re: restriction of access
« Reply #2 on: October 25, 2009, 02:20:04 AM »
Charliebrady

so what would be the best way to restrict one particular machine from accessing the smeserver without disconnecting it from the network?

Sal

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: restriction of access
« Reply #3 on: October 25, 2009, 07:04:07 AM »
sal1504:
please explain your problem/need, not your solution, thank you

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: restriction of access
« Reply #4 on: October 26, 2009, 12:19:22 AM »
sal1504

Quote
best way to restrict one particular machine from accessing the smeserver

What type of access are you trying to restrict ?

If it is web access, then use dansguardian & filter on IP.
Also configure IP address based on mac in hostnames and addresses panel
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline sal1504

  • ****
  • 149
  • +0/-0
Re: restriction of access
« Reply #5 on: October 27, 2009, 01:18:15 AM »
we have a fairly straight forward network with a smeserver 7.4 for mail, web, groupoffice and a windows 2008 server for sql database and user folders. everyone needs to access the 2008 server. we have one employee (contractor) who thinks he is the company IT expert and is constantly trying to access the smeserver with various hacks. we are trying to keep this particular computer off the server. as long as he is on his computer we can not take action. but if he goes to another persons computer then we can take legal action and i think the best way to stop him is to deny his computer access to the smeserver. since i do not have control of the windows server it is not of concern. because of company requlations i can't go into to many more details. i can tell you that employees are contractors and provide their own computers.

Sal

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: restriction of access
« Reply #6 on: October 27, 2009, 01:56:07 AM »
is constantly trying to access the smeserver with various hacks.

please define hacks.. as long he doens't know root/admin password I think he can not do anything

Quote
we are trying to keep this particular computer off the server. as long as he is on his computer we can not take action. but if he goes to another persons computer then we can take legal action and i think the best way to stop him is to deny his computer access to the smeserver. since i do not have control of the windows server it is not of concern. because of company requlations i can't go into to many more details. i can tell you that employees are contractors and provide their own computers.

Sal


well, I would send everybody a mail saying that any kind of access to resources will be logged and monitored.. :)

I would add also that even if they use their own pc, they are using them at YOUR "home", so they must stay at YOUR rules.. don't forget it
« Last Edit: October 27, 2009, 01:58:03 AM by Stefano »

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: restriction of access
« Reply #7 on: October 27, 2009, 09:33:12 PM »
Hello !

Actually it should be possible to filter out a PC on mac address without doing any "ugly and unauthorized things" with the firewall arrangement.

If one looks in the SME server wiki under Firewall: http://wiki.contribs.org/Firewall

There is a rubric: Block incoming IP address

This should be possible to give a small "adjustment", so it will filter out on MAC adresses in stead of source ip's:

Custom templates

Block incoming MAC address

I want to block All traffic from some mac-addresses to my server.
Create a custom template and list the mac's

mkdir -p /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/
pico -w /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/40DenyRiffRaff
/sbin/iptables -A INPUT -m mac --mac-source 00:0F:EA:91:04:08 -j DROP
/sbin/iptables -A INPUT -m mac --mac-source 00:0F:EA:91:04:09 -j DROP

expand and restart

/sbin/e-smith/expand-template /etc/rc.d/init.d/masq
/etc/init.d/masq restart


Exept for the Wiki I also used this web page as a reference. http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html

I can not test it just now. Could you please  leave a comment if it should work or not work ?
......

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: restriction of access
« Reply #8 on: October 27, 2009, 10:18:12 PM »
if it works, please report in the wiki , thank you

Offline sal1504

  • ****
  • 149
  • +0/-0
Re: restriction of access
« Reply #9 on: October 28, 2009, 02:58:59 AM »
works great and the guy has already tried to breach the server from another machine. He has no idea the trouble he is in.

Thanks for all the help.

Sal
« Last Edit: October 28, 2009, 03:03:10 AM by sal1504 »