GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
UID 0 is very powerful and can almost do anything so I can only think of three things for that: configure/modify the kernel, use another machine or create a virtual machine that will filter your connections, create a chroot-ed environment that will handle filters (not really effective I think since root will still be in the main environment).
I've gone through this a few times... Problem is that any time someone has root on a system they can, if they know what they're doing, reinstate the service you've tried to kill.
I'm not sure of the exact intent behind the block, but I'll say this: If you want to ensure that a site/service is not accessible and it's got to traverse the network, the best way to accomplish this is through configuration of some third-party device... Like the router.
Some may say that a simple mod to the routing table will kill it, others might suggest adding it manually to the resolution stack for your distro... Problem is that they're both on the system you're trying to block the site from and, sadly, that means that if you can do it as root, root can undo it.
You have the following options:
- If this is going to be a regular practice, implement a robust proxy server and block the sites you want blocked on that.
- If this is a one-off thing, just log into your router and (if it allows such a thing, which I believe most do now) block the remote address or set up a name resolution to resolve back to 127.0.0.1 or something of the sort...
Sorry I can't help more, but as I said, if root can do it, root can undo it in Linux.
... or use something like http://www.opendns.org/ (it's very simple to avoid, by changing the DNS entries - but a normal user normally don't know how to do this :P)
Kindly explain this one more, how and what should I do about it. Direct answers are not expected, you can point me to some links too.
The purpose is to create a system that is not accessible by root so in order to that, you can add another adjacent system where you'll pass or tunnel your connections. In that system, your connections will be filtered.
Creating a virtual system is a same concept only that the system is also hosted in the system where the root account in question is placed. There are two ways to do this but only one is really applicable. Either you place the virtual system inside the same system where you have root (with this it appears that root still have access) or you place the two system (the virtual and the system that contains root) as two virtual systems placed in a third main system. The third main (which will turn out to be the first now) will be hosting the virtualization software like VirtualBox or VMWare that will create and emulate your virtual systems. This is quite heavy though.
P.S. I'm getting a feeling that there's already a feature in the kernel where you can easily solve your approach. Something like a special layer for summoning special processes or userspace applications that are not preemptible by root and will handle the filter. Maybe also a special rule like the iptables that's only configurable on compile time.
@konsolebox: If I understand correctly you are still on the same physical machine, the only thing one does is create one or more (maybe encrypted) VM's. The root user can still change/edit/remove parts (if it is encrypted, root cannot access it but can remove it). Looks like extra layers that will not protect you from root when it comes down to it.
@anishakaul: You mention the following: I have the root password of my computer. If this is your computer, aren't you making it too hard for yourself to exclude root? If others do have access to your box, make sure that they do not have root access whatsoever (use sudo if they need some/limited access to specific files/commands).
This computer is in my office.
I am *HIGHLY ADDICTED* to a particular site.
I have requested the (windows based) system admins to block that site on my computer. They said that the site blocking software license has expired so they cannot block any site anywhere now.
... or use something like http://www.opendns.org/ (it's very simple to avoid, by changing the DNS entries - but a normal user normally don't know how to do this :P)
I think this is a good solution. Same also as asking a friend to host your dns queries. At least with that method even you won't be able to easily change the settings.
Quote:
Originally Posted by druuna
Hi,
@konsolebox: If I understand correctly you are still on the same physical machine, the only thing one does is create one or more (maybe encrypted) VM's. The root user can still change/edit/remove parts (if it is encrypted, root cannot access it but can remove it). Looks like extra layers that will not protect you from root when it comes down to it.
Let's say the place where the root account is placed in system B0 and the filter system is system B1. Both systems are hosted virtually by system A. Do you mean root in system B0 is still capable of accessing system A even if memory allocations and other resources are already isolated?
This computer is in my office.
I am *HIGHLY ADDICTED* to a particular site.
I have requested the (windows based) system admins to block that site on my computer. They said that the site blocking software license has expired so they cannot block any site anywhere now.
As I was expecting
Indeed I was thinking before about redirecting your dns queries to somewhere else but I haven't thought the obvious... It appears that you can still change it back to normal dns settings anytime you like. Guess I was wrong.
Btw if it's only a site block software that's required, maybe somewhere there's a free software that you can use? Did you try to search the web already. The concept about filtering your connection is still possible I think.
Last edited by konsolebox; 08-20-2010 at 08:41 AM.
Let's say the place where the root account is placed in system B0 and the filter system is system B1. Both systems are hosted virtually by system A. Do you mean root in system B0 is still capable of accessing system A even if memory allocations and other resources are already isolated?
root_b0 and root_b1 cannot access each other (depends on how things are set up on VM B0 and VM B1, but lets assume this is true).
root_a, however, can access the physical machine A and both VM's B0 and B1.
@anishakaul: Expired license..... LOL.
Seriously: This is probably the safest way to block a site (use a machine you do not have [enough] access on). I also find it kinda strange that the license is not renewed by your company, puts them in a precarious situation if they get audited.
BTW: You aren't talking about blocking LQ, are you
root_b0 and root_b1 cannot access each other (depends on how things are set up on VM B0 and VM B1, but lets assume this is true).
root_a, however, can access the physical machine A and both VM's B0 and B1.
With that my arguments should be invalid... but if it's only about root_b0 then it could still be valid (if with respect to applications and control inside B0). Up until now I don't really know if it's about the root account or the user who holds the root account that should have no access .
Quote:
Originally Posted by druuna
Seriously: This is probably the safest way to block a site (use a machine you do not have [enough] access on).
Not unless anishakaul's work is administrative?
Quote:
Originally Posted by druuna
BTW: You aren't talking about blocking LQ, are you
LOL
Last edited by konsolebox; 08-20-2010 at 08:53 AM.
This computer is in my office.
I am *HIGHLY ADDICTED* to a particular site.
Anything you can do to block it, you yourself can undo, you need to create personal restraint and self control over this issue, you can manage the computer, the computer CAN NOT manage you. If this really is such an issue for you, go to the admins and ask them to block all associated IPs to the site in question on the office router, this will block you out... however you yourself should be learning self-control and not relying on a machine to do for you, what you should be doing yourself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.