Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-25-2012, 11:41 AM
|
#1
|
|
Member
Registered: Dec 2011
Posts: 50
Rep: 
|
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 
|
|
|
|
01-25-2012, 02:24 PM
|
#2
|
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,674
|
@ 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
|
|
|
|
01-25-2012, 02:52 PM
|
#3
|
|
Member
Registered: Dec 2011
Posts: 50
Original Poster
Rep: 
|
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
Since I want to block .045 from accessing the Ubuntu Server. Im going through the other links you sent. Thanks!
Last edited by gtrrockz84; 01-25-2012 at 02:54 PM.
|
|
|
|
01-25-2012, 02:56 PM
|
#4
|
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,674
|
@ Reply
I would rather suggest:
Code:
ufw deny from <ip-address-of-the-host>
as this will block any tcp/udp communication from that host.
Just to add, following link I think will be more helpful when you are dealing with ufw: https://help.ubuntu.com/community/UFW
Last edited by T3RM1NVT0R; 01-25-2012 at 02:59 PM.
|
|
|
1 members found this post helpful.
|
01-25-2012, 03:01 PM
|
#5
|
|
Member
Registered: Dec 2011
Posts: 50
Original Poster
Rep: 
|
Oh I get it. The host being the computer I want to block. Gotchya! thanks 
|
|
|
|
01-25-2012, 03:04 PM
|
#6
|
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,674
|
@ Reply
You're welcome. Please mark the thread as solved if you think that the answer to your query has been provided.
Enjoy linux!!!
|
|
|
|
01-25-2012, 03:12 PM
|
#7
|
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464
|
You can block on IP, however, why not consider blocking on mac address?
http://www.cyberciti.biz/tips/iptabl...filtering.html
Kind regards
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:27 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|