![]() |
Blocking one pc from accessing ubuntu server
Hi everyone,
I set up a ubuntu server (running ubuntu desktop) connected to about 15 pcs using samba. All going good for a month now. I never set up any users or groups (not sure how). Today one of my colleague said he needs to make one of the pc's not accessible to the server. Can anyone please help on how to do this? Also I like to know how to setup users and groups too (im assuming this might be necessary to solve my question too?) Thanks for your help :) |
@ Reply
Hi gtrrockz84,
I think Ubuntu firewall (ufw) can help you achieve what you are looking for. Here is the document for your reference: https://help.ubuntu.com/8.04/serverg.../firewall.html I am assuming that you do not want a particular PC to access samba share on this particular server. If that is the case you can block the communication from that particular system's IP address on port 137 (UDP),138 (UDP), 139 (UDP) and 445 (tcp). If you do not want this machine to talk to your Ubuntu server at all then you can configure the UFW to reject any packet received from this machine. For setting up samba users and groups the following links will help you out: https://help.ubuntu.com/8.04/serverg...ing-samba.html https://help.ubuntu.com/10.04/server...-security.html |
Hi TeRM1NVTOR,
Thanks a lot for your help. So after reading the first link im thinking my command line should look like Code:
sudo ufw deny proto tcp from 192.168.100.045 |
@ Reply
I would rather suggest:
Code:
ufw deny from <ip-address-of-the-host>Just to add, following link I think will be more helpful when you are dealing with ufw: https://help.ubuntu.com/community/UFW |
Oh I get it. The host being the computer I want to block. Gotchya! thanks :)
|
@ Reply
You're welcome. Please mark the thread as solved if you think that the answer to your query has been provided.
Enjoy linux!!! |
You can block on IP, however, why not consider blocking on mac address?
http://www.cyberciti.biz/tips/iptabl...filtering.html Kind regards |
| All times are GMT -5. The time now is 11:15 AM. |