Using ufw to block telnet from specified host

0

I'm new to ufw tool, I'm trying to block a specified host from requesting telnet while allowing other hosts on the network to do so.

When I use this command:

sudo ufw deny 23

The other host is unable to telnet to me. However, this denies everything that uses port 23 and all other hosts who attempt using telnet.

Therefore, I have tried the following:

sudo ufw deny from HOST port 23
sudo ufw deny to HOST port 23

I was hoping this will deny that host but it literally did nothing. The other host is still able to telnet as if the rules do not exist.

What am I doing wrong?

Everyone

Posted 2018-02-12T09:09:53.083

Reputation: 111

May I know why I'm being downvoted? Is the question not meeting some standard? Or just some guy who decided the question is too easy for him that it doesn't qualify to be asked? I said I'm new and I needed help. Thanks for discouraging people to ask for help. – Everyone – 2018-02-12T09:19:23.787

Answers

2

ufw deny from IP to any port 23

vautee

Posted 2018-02-12T09:09:53.083

Reputation: 653

1Thank you that was really helpful as I had a confusion when I viewed the status. – Everyone – 2018-02-12T09:18:16.253

can you give more of an explanation as to what "to any port" is doing? – Zach – 2019-04-07T03:24:57.657

"to any port 23" -> allow access to any target IP on port 23 – vautee – 2019-09-12T09:18:37.120