Concurrently block a web site on some browsers but not others
I need the ability to block a particular web site, in this case youtube.com, on selected browsers or browser instances, but not block it on others. For example, suppose I have different browsers or browser instances open in virtual desktops 1, 2, and 3. I want to block youtube.com in Desktop 1 and Desktop 2, but I don't want to block youtube.com in Desktop 3.
I'm aware that sites can be blocked using the hosts file. Is there a way to do so differentially, as described, or another mechanism that would enable this?
My system uses Openbox on Ubuntu 16.04. I use Firefox, but could use other browsers if necessary. My system is slow and has limited resources, so VMs would not be a practical approach.
ubuntu firefox ubuntu-16.04 hosts openbox
|
show 1 more comment
I need the ability to block a particular web site, in this case youtube.com, on selected browsers or browser instances, but not block it on others. For example, suppose I have different browsers or browser instances open in virtual desktops 1, 2, and 3. I want to block youtube.com in Desktop 1 and Desktop 2, but I don't want to block youtube.com in Desktop 3.
I'm aware that sites can be blocked using the hosts file. Is there a way to do so differentially, as described, or another mechanism that would enable this?
My system uses Openbox on Ubuntu 16.04. I use Firefox, but could use other browsers if necessary. My system is slow and has limited resources, so VMs would not be a practical approach.
ubuntu firefox ubuntu-16.04 hosts openbox
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12
|
show 1 more comment
I need the ability to block a particular web site, in this case youtube.com, on selected browsers or browser instances, but not block it on others. For example, suppose I have different browsers or browser instances open in virtual desktops 1, 2, and 3. I want to block youtube.com in Desktop 1 and Desktop 2, but I don't want to block youtube.com in Desktop 3.
I'm aware that sites can be blocked using the hosts file. Is there a way to do so differentially, as described, or another mechanism that would enable this?
My system uses Openbox on Ubuntu 16.04. I use Firefox, but could use other browsers if necessary. My system is slow and has limited resources, so VMs would not be a practical approach.
ubuntu firefox ubuntu-16.04 hosts openbox
I need the ability to block a particular web site, in this case youtube.com, on selected browsers or browser instances, but not block it on others. For example, suppose I have different browsers or browser instances open in virtual desktops 1, 2, and 3. I want to block youtube.com in Desktop 1 and Desktop 2, but I don't want to block youtube.com in Desktop 3.
I'm aware that sites can be blocked using the hosts file. Is there a way to do so differentially, as described, or another mechanism that would enable this?
My system uses Openbox on Ubuntu 16.04. I use Firefox, but could use other browsers if necessary. My system is slow and has limited resources, so VMs would not be a practical approach.
ubuntu firefox ubuntu-16.04 hosts openbox
ubuntu firefox ubuntu-16.04 hosts openbox
edited Jan 11 at 3:10
fixer1234
18.8k144982
18.8k144982
asked Jan 9 at 12:47
IevgenIevgen
2815
2815
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12
|
show 1 more comment
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12
|
show 1 more comment
1 Answer
1
active
oldest
votes
There is no trivial way to do this because you do not control the site serving the pages. You can't do this with the hosts file as the hosts file only translates domains into IP addresses.
It could (theoretically) be done by forcing users through a proxy, and having the proxy provide different content restrictions based on the USERAGENT string. You would probably also need to deal with breaking HTTPS which would mean adding your own cert into the chain.
An alternative ight be to get an application layer firewall if you control the client.
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392280%2fconcurrently-block-a-web-site-on-some-browsers-but-not-others%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is no trivial way to do this because you do not control the site serving the pages. You can't do this with the hosts file as the hosts file only translates domains into IP addresses.
It could (theoretically) be done by forcing users through a proxy, and having the proxy provide different content restrictions based on the USERAGENT string. You would probably also need to deal with breaking HTTPS which would mean adding your own cert into the chain.
An alternative ight be to get an application layer firewall if you control the client.
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
add a comment |
There is no trivial way to do this because you do not control the site serving the pages. You can't do this with the hosts file as the hosts file only translates domains into IP addresses.
It could (theoretically) be done by forcing users through a proxy, and having the proxy provide different content restrictions based on the USERAGENT string. You would probably also need to deal with breaking HTTPS which would mean adding your own cert into the chain.
An alternative ight be to get an application layer firewall if you control the client.
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
add a comment |
There is no trivial way to do this because you do not control the site serving the pages. You can't do this with the hosts file as the hosts file only translates domains into IP addresses.
It could (theoretically) be done by forcing users through a proxy, and having the proxy provide different content restrictions based on the USERAGENT string. You would probably also need to deal with breaking HTTPS which would mean adding your own cert into the chain.
An alternative ight be to get an application layer firewall if you control the client.
There is no trivial way to do this because you do not control the site serving the pages. You can't do this with the hosts file as the hosts file only translates domains into IP addresses.
It could (theoretically) be done by forcing users through a proxy, and having the proxy provide different content restrictions based on the USERAGENT string. You would probably also need to deal with breaking HTTPS which would mean adding your own cert into the chain.
An alternative ight be to get an application layer firewall if you control the client.
answered Jan 11 at 3:35
davidgodavidgo
43.9k75291
43.9k75291
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
add a comment |
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
Is the blocking "by browser type" actually required? If not, and if it is putting up an obstacle to the uninformed rather then "this is almost impossible to get arround", you would probably find it easier to do firewalling on the router combined with IP address allocation through DHCP - where the IP allocation drops connections in a pool which can / can not browse Youtube.
– davidgo
Jan 11 at 3:38
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392280%2fconcurrently-block-a-web-site-on-some-browsers-but-not-others%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The desktops aren't like VMs. They're like grouping your application windows on multiple virtual monitors, and you chose which one to look at. With a single physical monitor, it just hides the stuff you aren't currently working with. All of the application windows would otherwise be competing for space on one desktop. Virtual desktops don't really buy you anything over what you would do in a single desktop. You would need three instances of browsers open concurrently, and you would configure each one as desired.
– fixer1234
Jan 9 at 13:08
Can I running firefox with option - run application (for example) with hosts2? Or maybe.. I can setup to access youtube.com with different adress youtube2.com? Instead youtube.com, but block youtube.com? I know about VMs, but I dont want use them. I have very slow PC server based on Odroid C2
– Ievgen
Jan 9 at 13:50
The question seems to focus on capitalizing on the virtual desktops to do different things with youtube. My point was that the desktops provide no benefit in that regard. So doing different things with youtube would be the same as if you weren't using virtual desktops. You would need three concurrent instances of browsers, and each one could be configured to the extent you can configure a browser to do what you want. From your comment, it sounds like maybe your question just suggested desktops as a possible mechanism, (cont'd)
– fixer1234
Jan 9 at 14:15
but it is actually asking about multiple concurrent instances of browsers, and blocking or not blocking youtube in various ones via the hosts file. The hosts file is applied at the OS-level, and all of the browsers operate in the same environment. So if the key part of your question is use of the hosts file, I think you could only do that with VMs. If the key part of your question is just differentially blocking youtube, you could probably accomplish that by means other than using the hosts file. If you can clarify the question, people will be better able to answer.
– fixer1234
Jan 9 at 14:15
I know only one way for blocking sites - hosts. But I need locally deny access to youtube.com, but also I need to access to youtube from another program.
– Ievgen
Jan 10 at 14:12