How to ban all connections to .se and .ru in the hosts.deny fileForce telnet / ssh to use crtl-H for backspaceHow to find where driver.mod.c links to?How do I count the exact total of created and deleted sqlite journal files?Determine whether kernel built-in driver supports a deviceMyth or reality: SELinux can confine the root user?Build my own firewall, in Java or other high-level language?How to use dnstraceroute?Reject all connections except from a specific IPAuto sign in on boot with SecuritySSH IP access restriction using tcpwrappers is not working. (hosts.allow and hosts.deny not taken into account)
Is there a word that describes the unjustified use of a more complex word?
Why didn't this character get a funeral at the end of Avengers: Endgame?
Constitutional limitation of criminalizing behavior in US law?
What do you call a painting on a wall?
Why does sound not move through a wall?
Counting the Number of Real Roots of A Polynomial
Can't delete OU from AD, IsCriticalSystemObject attribute TRUE - cannot change
How to pass query parameters in URL in Salesforce Summer 19 Release?
Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?
Hostile Divisor Numbers
Why did WWI include Japan?
How to properly store the current value of int variable into a token list?
MX records from second domain to point to first domain but email is not delivered like on first domain
When did England stop being a Papal fief?
What's the 2-minute timer on mobile Deutsche Bahn tickets?
Is Iron Man stronger than the Hulk?
My first C++ game (snake console game)
Is any special diet an effective treatment of autism?
GitLab account hacked and repo wiped
All of my Firefox add-ons been disabled suddenly, how can I re-enable them?
Simple Derivative Proof?
Should I simplify my writing in a foreign country?
Dihedral group D4 composition with custom labels
All superlinear runtime algorithms are asymptotically equivalent to convex function?
How to ban all connections to .se and .ru in the hosts.deny file
Force telnet / ssh to use crtl-H for backspaceHow to find where driver.mod.c links to?How do I count the exact total of created and deleted sqlite journal files?Determine whether kernel built-in driver supports a deviceMyth or reality: SELinux can confine the root user?Build my own firewall, in Java or other high-level language?How to use dnstraceroute?Reject all connections except from a specific IPAuto sign in on boot with SecuritySSH IP access restriction using tcpwrappers is not working. (hosts.allow and hosts.deny not taken into account)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to figure out, whether or not it's possible to make sure, that if a user uses a browser and types in a domain name that ends on either "se" or "ru", they will be denied access to that site.
PS: this is a school assignment, and my teacher demands that I make use of tcp wrapper, so downloading some module that will do the trick is out of the question, unfortunately
linux security tcp-wrappers
New contributor
add a comment |
I am trying to figure out, whether or not it's possible to make sure, that if a user uses a browser and types in a domain name that ends on either "se" or "ru", they will be denied access to that site.
PS: this is a school assignment, and my teacher demands that I make use of tcp wrapper, so downloading some module that will do the trick is out of the question, unfortunately
linux security tcp-wrappers
New contributor
1
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
I love that idea lol
– Brad Bit
May 1 at 17:47
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago
add a comment |
I am trying to figure out, whether or not it's possible to make sure, that if a user uses a browser and types in a domain name that ends on either "se" or "ru", they will be denied access to that site.
PS: this is a school assignment, and my teacher demands that I make use of tcp wrapper, so downloading some module that will do the trick is out of the question, unfortunately
linux security tcp-wrappers
New contributor
I am trying to figure out, whether or not it's possible to make sure, that if a user uses a browser and types in a domain name that ends on either "se" or "ru", they will be denied access to that site.
PS: this is a school assignment, and my teacher demands that I make use of tcp wrapper, so downloading some module that will do the trick is out of the question, unfortunately
linux security tcp-wrappers
linux security tcp-wrappers
New contributor
New contributor
edited 2 days ago
sourcejedi
26.8k446119
26.8k446119
New contributor
asked May 1 at 16:35
Brad BitBrad Bit
132
132
New contributor
New contributor
1
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
I love that idea lol
– Brad Bit
May 1 at 17:47
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago
add a comment |
1
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
I love that idea lol
– Brad Bit
May 1 at 17:47
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago
1
1
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
I love that idea lol
– Brad Bit
May 1 at 17:47
I love that idea lol
– Brad Bit
May 1 at 17:47
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
No, it is not possible. (It might be a trick question :-).
TCP Wrapper (tcp_wrappers_7.6.tar.gz)
Wietse Venema's network logger, also known as TCPD or LOG_TCP. These programs log the client host name of incoming telnet, ftp, rsh, rlogin, finger etc. requests.
To fetch a website, a web browser makes an outgoing request. (And web browsers do not abuse libwrap
for a purpose it is not intended for.)
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
add a comment |
TCP wrappers have been falling out of fashion. Webservers (Apache and others) might need to be compiled with support for TCP wrappers. Apache and Nginx have their own methods and modules which normally are used.
The Web server, Nginx, also does not support TCP wrappers, but there is a module to support them at this address: https://github.com/sjinks/ngx_tcpwrappers. This also requires compilation from source and has severe limitations.
It should be noted that TCP Wrappers have several peculiarities you
should know about:
the most disappointing thing is that libwrap (library implementing TCP
Wrappers functionality) is not a thread safe library. In other words,
if two threads try to simultaneously use libwrap, the results could be
weird. This is because libwrap uses non-reentrant functions like
strtok(), gethostbyname(), gethostbyaddr() etc. If nginx is built with
threading support (does it work yet?), use of libwrap can lead to
performance penalties (because access to libwrap functions will have
to be serialized). If nginx is configured without threading support
(this is the default for Linux), everything is OK.
dynamic ACL
configuration comes at a price: libwrap will read and parse
/etc/hosts.allow and /etc/hosts.deny on every request; this may be an
issue for high-loaded projects.
So in the end, using tcpwrappers is not feasible.
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
);
);
Brad Bit is a new contributor. Be nice, and check out our Code of Conduct.
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%2funix.stackexchange.com%2fquestions%2f516588%2fhow-to-ban-all-connections-to-se-and-ru-in-the-hosts-deny-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
No, it is not possible. (It might be a trick question :-).
TCP Wrapper (tcp_wrappers_7.6.tar.gz)
Wietse Venema's network logger, also known as TCPD or LOG_TCP. These programs log the client host name of incoming telnet, ftp, rsh, rlogin, finger etc. requests.
To fetch a website, a web browser makes an outgoing request. (And web browsers do not abuse libwrap
for a purpose it is not intended for.)
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
add a comment |
No, it is not possible. (It might be a trick question :-).
TCP Wrapper (tcp_wrappers_7.6.tar.gz)
Wietse Venema's network logger, also known as TCPD or LOG_TCP. These programs log the client host name of incoming telnet, ftp, rsh, rlogin, finger etc. requests.
To fetch a website, a web browser makes an outgoing request. (And web browsers do not abuse libwrap
for a purpose it is not intended for.)
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
add a comment |
No, it is not possible. (It might be a trick question :-).
TCP Wrapper (tcp_wrappers_7.6.tar.gz)
Wietse Venema's network logger, also known as TCPD or LOG_TCP. These programs log the client host name of incoming telnet, ftp, rsh, rlogin, finger etc. requests.
To fetch a website, a web browser makes an outgoing request. (And web browsers do not abuse libwrap
for a purpose it is not intended for.)
No, it is not possible. (It might be a trick question :-).
TCP Wrapper (tcp_wrappers_7.6.tar.gz)
Wietse Venema's network logger, also known as TCPD or LOG_TCP. These programs log the client host name of incoming telnet, ftp, rsh, rlogin, finger etc. requests.
To fetch a website, a web browser makes an outgoing request. (And web browsers do not abuse libwrap
for a purpose it is not intended for.)
edited 2 days ago
answered May 1 at 16:55
sourcejedisourcejedi
26.8k446119
26.8k446119
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
add a comment |
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
by "no/ trick question", do you mean that it's impossible to make the restrictions I want with tcp wrappers? If so, I thought it might be the case, since my teacher has made mistakes in past assignments that he has corrected later on
– Brad Bit
May 1 at 17:34
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
Thanks a ton. He mentioned iptables earlier (which I think also might be a bit outdated, but it should do the trick), so I think that's what he wants me to use :)
– Brad Bit
2 days ago
add a comment |
TCP wrappers have been falling out of fashion. Webservers (Apache and others) might need to be compiled with support for TCP wrappers. Apache and Nginx have their own methods and modules which normally are used.
The Web server, Nginx, also does not support TCP wrappers, but there is a module to support them at this address: https://github.com/sjinks/ngx_tcpwrappers. This also requires compilation from source and has severe limitations.
It should be noted that TCP Wrappers have several peculiarities you
should know about:
the most disappointing thing is that libwrap (library implementing TCP
Wrappers functionality) is not a thread safe library. In other words,
if two threads try to simultaneously use libwrap, the results could be
weird. This is because libwrap uses non-reentrant functions like
strtok(), gethostbyname(), gethostbyaddr() etc. If nginx is built with
threading support (does it work yet?), use of libwrap can lead to
performance penalties (because access to libwrap functions will have
to be serialized). If nginx is configured without threading support
(this is the default for Linux), everything is OK.
dynamic ACL
configuration comes at a price: libwrap will read and parse
/etc/hosts.allow and /etc/hosts.deny on every request; this may be an
issue for high-loaded projects.
So in the end, using tcpwrappers is not feasible.
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
add a comment |
TCP wrappers have been falling out of fashion. Webservers (Apache and others) might need to be compiled with support for TCP wrappers. Apache and Nginx have their own methods and modules which normally are used.
The Web server, Nginx, also does not support TCP wrappers, but there is a module to support them at this address: https://github.com/sjinks/ngx_tcpwrappers. This also requires compilation from source and has severe limitations.
It should be noted that TCP Wrappers have several peculiarities you
should know about:
the most disappointing thing is that libwrap (library implementing TCP
Wrappers functionality) is not a thread safe library. In other words,
if two threads try to simultaneously use libwrap, the results could be
weird. This is because libwrap uses non-reentrant functions like
strtok(), gethostbyname(), gethostbyaddr() etc. If nginx is built with
threading support (does it work yet?), use of libwrap can lead to
performance penalties (because access to libwrap functions will have
to be serialized). If nginx is configured without threading support
(this is the default for Linux), everything is OK.
dynamic ACL
configuration comes at a price: libwrap will read and parse
/etc/hosts.allow and /etc/hosts.deny on every request; this may be an
issue for high-loaded projects.
So in the end, using tcpwrappers is not feasible.
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
add a comment |
TCP wrappers have been falling out of fashion. Webservers (Apache and others) might need to be compiled with support for TCP wrappers. Apache and Nginx have their own methods and modules which normally are used.
The Web server, Nginx, also does not support TCP wrappers, but there is a module to support them at this address: https://github.com/sjinks/ngx_tcpwrappers. This also requires compilation from source and has severe limitations.
It should be noted that TCP Wrappers have several peculiarities you
should know about:
the most disappointing thing is that libwrap (library implementing TCP
Wrappers functionality) is not a thread safe library. In other words,
if two threads try to simultaneously use libwrap, the results could be
weird. This is because libwrap uses non-reentrant functions like
strtok(), gethostbyname(), gethostbyaddr() etc. If nginx is built with
threading support (does it work yet?), use of libwrap can lead to
performance penalties (because access to libwrap functions will have
to be serialized). If nginx is configured without threading support
(this is the default for Linux), everything is OK.
dynamic ACL
configuration comes at a price: libwrap will read and parse
/etc/hosts.allow and /etc/hosts.deny on every request; this may be an
issue for high-loaded projects.
So in the end, using tcpwrappers is not feasible.
TCP wrappers have been falling out of fashion. Webservers (Apache and others) might need to be compiled with support for TCP wrappers. Apache and Nginx have their own methods and modules which normally are used.
The Web server, Nginx, also does not support TCP wrappers, but there is a module to support them at this address: https://github.com/sjinks/ngx_tcpwrappers. This also requires compilation from source and has severe limitations.
It should be noted that TCP Wrappers have several peculiarities you
should know about:
the most disappointing thing is that libwrap (library implementing TCP
Wrappers functionality) is not a thread safe library. In other words,
if two threads try to simultaneously use libwrap, the results could be
weird. This is because libwrap uses non-reentrant functions like
strtok(), gethostbyname(), gethostbyaddr() etc. If nginx is built with
threading support (does it work yet?), use of libwrap can lead to
performance penalties (because access to libwrap functions will have
to be serialized). If nginx is configured without threading support
(this is the default for Linux), everything is OK.
dynamic ACL
configuration comes at a price: libwrap will read and parse
/etc/hosts.allow and /etc/hosts.deny on every request; this may be an
issue for high-loaded projects.
So in the end, using tcpwrappers is not feasible.
edited 2 days ago
answered May 1 at 16:43
Rui F RibeiroRui F Ribeiro
42.6k1486146
42.6k1486146
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
add a comment |
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
Still, it looks like that module will only restrict incoming connections to Nginx, not the destination of outgoing or proxied connections.
– telcoM
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
@telcoM The exercise does not make much sense as it is...
– Rui F Ribeiro
2 days ago
add a comment |
Brad Bit is a new contributor. Be nice, and check out our Code of Conduct.
Brad Bit is a new contributor. Be nice, and check out our Code of Conduct.
Brad Bit is a new contributor. Be nice, and check out our Code of Conduct.
Brad Bit is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f516588%2fhow-to-ban-all-connections-to-se-and-ru-in-the-hosts-deny-file%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
1
Be much easier/quicker (but not the point of the assignment maybe) to set up a local DNS server and spoof being authoritative on your LAN for the TLDs you want to block access for. This is what I do at home, it is great being able to spoof Facebook with a message to my kids about "go do your homework instead"
– ivanivan
May 1 at 17:09
I love that idea lol
– Brad Bit
May 1 at 17:47
@ivanivan dnsmasq would be easier for a single computer. Saying that I also use a local BIND server to curb on advertisement/malware domains.
– Rui F Ribeiro
2 days ago
If people are interested in DNS-based censorship, I recommend writing a dedicated question, where it would be easier to raise any limitations or caveats :-).
– sourcejedi
2 days ago