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.
It is fixed when i set the default for input to accept, so i guess im missing something i should accept.
I cant figure out what im doing wrong, could somebody give me a hint?
It seems to be the same for other outgoing connections so it might not be specific for icmp
That fixed the problem: can you explain why this failed in the first place?
Actually, I'm not exactly sure. When this box pings another box, the echo reply packet is sent to ACCEPT because it matches ESTABLISHED in the INPUT chain. It wasn't doing that before since the TCP match would prevent the ICMP packet from matching. That said, even with the TCP match enabled, I would have expected the echo reply packet to match the last rule in the chain, which AFAICT sends every ICMP packet to ACCEPT.
Code:
Chain INPUT (policy DROP 270 packets, 31057 bytes)
pkts bytes target prot opt in out source destination
56032 7578K ACCEPT tcp -- any any anywhere anywhere state RELATED,ESTABLISHED
1056 54516 ACCEPT tcp -- any any anywhere anywhere tcp dpt:www
9 540 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ftp
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh
21 1156 ACCEPT tcp -- any any anywhere anywhere tcp dpt:smtp
242 12376 ACCEPT tcp -- any any anywhere anywhere tcp dpt:pop3
9 540 ACCEPT tcp -- any any anywhere anywhere tcp dpt:imap2
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:imaps
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:pop3s
113 6780 ACCEPT tcp -- any any anywhere anywhere tcp dpt:mysql
2 104 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http-alt
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:webmin
0 0 ACCEPT icmp -- any any anywhere anywhere
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 114K packets, 103M bytes)
pkts bytes target prot opt in out source destination
Okay, after doing some tests on my box (and re-reading your configuration), I'm willing to bet that although you weren't able to ping by host name, you were able to ping by IP. Can you confirm this?
I suspect that this was simply a case of the DNS lookups not being able to take place, due to their being no way for the returning UDP packets to be allowed. In other words, I theorize that you weren't receiving echo replies at all, because your echo requests weren't being sent in the first place. If I'm correct, then what happened when you removed the TCP match from your RELATED,ESTABLISHED rule was that you allowed DNS lookups to complete.
You are correct. I should have realised this, because ping gave no output at all.
On to the next problem, with these rules ftp doesn't work yet If you have any suggestions, they are welcome. I am going to wait a bit with debugging till tonight, it's on a production server (don't ask).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.