LinuxQuestions.org
Register a domain and help support LQ
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 01-25-2012, 11:41 AM   #1
gtrrockz84
Member
 
Registered: Dec 2011
Posts: 50

Rep: Reputation: Disabled
Question 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
 
Old 01-25-2012, 02:24 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,692

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
@ 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
 
Old 01-25-2012, 02:52 PM   #3
gtrrockz84
Member
 
Registered: Dec 2011
Posts: 50

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-25-2012, 02:56 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,692

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
@ 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.
Old 01-25-2012, 03:01 PM   #5
gtrrockz84
Member
 
Registered: Dec 2011
Posts: 50

Original Poster
Rep: Reputation: Disabled
Oh I get it. The host being the computer I want to block. Gotchya! thanks
 
Old 01-25-2012, 03:04 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,692

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
@ Reply

You're welcome. Please mark the thread as solved if you think that the answer to your query has been provided.

Enjoy linux!!!
 
Old 01-25-2012, 03:12 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,488

Rep: Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882Reputation: 882
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.
  


Reply

Tags
groups, network, pc, samba, users


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Blocking certain MAC Address from accessing services kumawat10 Linux - Security 4 12-01-2011 09:19 PM
unwanted blocking ip address and session log out in ubuntu 10.04 server (Zentyal) golden_boy615 Linux - Networking 9 07-03-2011 07:30 AM
Blocking countries from accessing my server? arashi256 Linux - Newbie 4 06-03-2010 03:19 PM
Ubuntu server no longer accessing internet xTheLostx Linux - Networking 3 09-29-2005 08:03 PM
Blocking an account from accessing the internet. magnum818 Linux - Security 2 12-03-2003 01:50 AM


All times are GMT -5. The time now is 12:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration