Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
I have this firewall rule setup on my computer, but for some strange reason I cannot ping outside of my network. It was designed to stop people pinging me but instead I find I'm having trouble pinging out.
Here is the rule I'm using:
------------------<snipet>-------------------
iptables --append INPUT --protocol icmp --in-interface ppp0 --jump REJECT --reject-with icmp-net-unreachable
------------------<snipet>-------------------
That last rule you gave me prevented ethernet connections, and I want those so here is a rule that prevents ppp0 but allows everything else to make new connections...
# Create chain which blocks new connections, except if coming from inside
iptables --new-chain block
iptables --append block --match state --state ESTABLISHED,RELATED --jump ACCEPT
iptables --append block --match state --state NEW --in-interface ! ppp0 --jump ACCEPT
iptables --append block --jump DROP
# Jump to that chain from INPUT and FORWARD chains.
iptables --append INPUT --jump block
iptables --append FORWARD --jump block
What you could do is add a LOG target rule before making "final verdicts" in a chain. This will help you troubleshoot what gets DROPped instead of ACCEPTed. Like ident requests (TCP/113) most IRC servers need a response for, for example.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.