I need to limit all websites for certain user (not a root) but one website should be available for example www.allow-website.com and all subdomains too www.allow-website.com/*.

This lock should work for all types of HTTP clients, not only browsers. Any requests not corresponding to www.allow-website.com not should be sent.

What the easiest way to implement this logic with Ubuntu?

  • Are you talking about limiting access to a locally run web server, proxy server, or a DNS server? Or a remotely run server? – Tom Trebicky Sep 9 '19 at 0:49
  • 2
    use a proxy server (e.g. squid), block direct access to common ports used for web traffic (e.g. block ports 80, 8080, 3128, 443, etc at your firewall. remember to allow your proxy's IP address to access these ports), configure the proxy to require users to authenticate, allow only that one site site for your target user, and allow all other users to access everything. – cas Sep 9 '19 at 3:22
  • @Tom Trebicky for one local machine. – Pavel Sep 9 '19 at 8:31

Squid and other proxy servers can restrict access on a user-specific basis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.