I have DENIED both incoming and outgoing connections using ufw on Debian VPS. There is only one rule defined, which is to allow connection to SSH port.

ufw is enabled and working.

Yet I am still able to ping from my laptop to server using its IP. Why is ping still working if both incoming and outgoing connections are blocked (except SSH)?

  • 2
    Check this Aug 5, 2017 at 15:56
  • 2
    You have blocked ports. Ports are for TCP and UDP. Ping doesn't use ports.
    – user207421
    Aug 6, 2017 at 1:24

1 Answer 1


Ping is ICMP so there's no TCP/UDP connections to block or accept (and that's what you probably denied). ICMP rules are configured in /etc/ufw/before.rules.

See this for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .