相关文章推荐
瘦瘦的青蛙  ·  在使用Dask ...·  9 月前    · 
瘦瘦的小熊猫  ·  GCS获取blob文件名·  1 年前    · 

I'm starting to see new IP added to INPUT chain with REJECT "reject-with icmp-port-unreachable" but it's not clear who added them and where I can stop this.

It's not clear which system are creating these rules. We are not using this kind of rules "REJECT" in our APP, we use only DROP rules. These ones are a mistery.

Some idea how did they appear here?

Do you use a custom firewall on your server like CSF? Or maybe you're using fail2ban or any other similar tool?! Bogdan Stoica Jul 4 '17 at 12:31 I used a DDOS firewall written by me. Those records didn't come from that software. I never used "reject-with icmp-port-unreachable" in my rules. Max Cuttins Jul 11 '17 at 12:10

The REJECT target rejects the packet. If you do not specify which ICMP message to reject with, the server by default will send back ICMP port unreachable (type 3, code 3).

It would be wise to read the iptables documentation to understand what each action does (-j DROP vs. -j REJECT).

So the firewall you did create is adding those rules for your since you most probably used the -j REJECT instead of -j DROP flag.

As a basic rule you should use -j REJECT for your local network and -j DROP for the internet traffic that's hitting your server. When using REJECT rules an ICMP packet is sent indicating the port is unavailable. So your server might get exposed.

To answer your question, your own firewall created those rules.

I just realize that somebody has changed the behaviour of the firewall switching from DROP to REJECT Max Cuttins Jul 17 '17 at 9:07

Thanks for contributing an answer to Stack Overflow!

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

site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required . rev 2019.9.6.34826