Why is adding a loopback rule needed for internet to work when your iptables policy on INPUT is set to DROP?












0














I don't quite get why it's needed. Say you have the following iptables policies:



INPUT (DROP)



-m conntrack --ctstate ESTABLISHED -j ACCEPT



FORWARD (DROP)



None



OUTPUT (DROP)



Rules to allow 443, 80, 53



Trying to access any site with the web browser results in no success with this ruleset but if you add the rule



-i lo -j ACCEPT



to INPUT it starts working.



Basically, I want to know the architectural/design reason as to why this has to be a thing.










share|improve this question


















  • 1




    The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
    – dirkt
    Dec 3 at 7:49










  • Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
    – Resonce
    Dec 5 at 3:53










  • It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
    – dirkt
    Dec 5 at 6:58
















0














I don't quite get why it's needed. Say you have the following iptables policies:



INPUT (DROP)



-m conntrack --ctstate ESTABLISHED -j ACCEPT



FORWARD (DROP)



None



OUTPUT (DROP)



Rules to allow 443, 80, 53



Trying to access any site with the web browser results in no success with this ruleset but if you add the rule



-i lo -j ACCEPT



to INPUT it starts working.



Basically, I want to know the architectural/design reason as to why this has to be a thing.










share|improve this question


















  • 1




    The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
    – dirkt
    Dec 3 at 7:49










  • Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
    – Resonce
    Dec 5 at 3:53










  • It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
    – dirkt
    Dec 5 at 6:58














0












0








0


0





I don't quite get why it's needed. Say you have the following iptables policies:



INPUT (DROP)



-m conntrack --ctstate ESTABLISHED -j ACCEPT



FORWARD (DROP)



None



OUTPUT (DROP)



Rules to allow 443, 80, 53



Trying to access any site with the web browser results in no success with this ruleset but if you add the rule



-i lo -j ACCEPT



to INPUT it starts working.



Basically, I want to know the architectural/design reason as to why this has to be a thing.










share|improve this question













I don't quite get why it's needed. Say you have the following iptables policies:



INPUT (DROP)



-m conntrack --ctstate ESTABLISHED -j ACCEPT



FORWARD (DROP)



None



OUTPUT (DROP)



Rules to allow 443, 80, 53



Trying to access any site with the web browser results in no success with this ruleset but if you add the rule



-i lo -j ACCEPT



to INPUT it starts working.



Basically, I want to know the architectural/design reason as to why this has to be a thing.







linux networking firewall iptables






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 3 at 7:35









Resonce

11




11








  • 1




    The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
    – dirkt
    Dec 3 at 7:49










  • Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
    – Resonce
    Dec 5 at 3:53










  • It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
    – dirkt
    Dec 5 at 6:58














  • 1




    The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
    – dirkt
    Dec 3 at 7:49










  • Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
    – Resonce
    Dec 5 at 3:53










  • It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
    – dirkt
    Dec 5 at 6:58








1




1




The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
– dirkt
Dec 3 at 7:49




The loopback device is for network connections between local applications (HTTP proxy, DNS proxy). If you disallow any of those with a default policy of DROP, but if your browser needs any of these, it won't work. To see what actually goes over the loopback device, run Wireshark etc. on it and have a look, then you'll know what it is that the browser requires.
– dirkt
Dec 3 at 7:49












Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
– Resonce
Dec 5 at 3:53




Thank you very much for that answer. Guess I'll start digging next week XD I'll get back to you and hopefully come back with conclusive results and by then, I hope you put your comment as an answer so I can mark it as the solution.
– Resonce
Dec 5 at 3:53












It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
– dirkt
Dec 5 at 6:58




It would be nice to have an answer which explains which traffic was actually going over the loopback interface in your case, which is why I just did a comment. BTW, you can also answer your own question. If you want to cut&paste snooped traffic into the question/answer, use tcpdump instead of wireshark (if there's a good textual export from wireshark, I somehow missed it).
– dirkt
Dec 5 at 6:58















active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1380337%2fwhy-is-adding-a-loopback-rule-needed-for-internet-to-work-when-your-iptables-pol%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1380337%2fwhy-is-adding-a-loopback-rule-needed-for-internet-to-work-when-your-iptables-pol%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Plaza Victoria

Puebla de Zaragoza

Musa