• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to deny and redirect ssh port on CSF in Linux Mint 20

  • 00:43 lsb_release -a
  • 01:04 vim /etc/ssh/sshd-config
  • 01:34 systemctl restart ssh
  • 01:47 vim /etc/csf/csf.redirect
  • 02:46 vim /etc/csf/csf.conf
  • 03:26 csf -r
{{postValue.id}}

To deny and redirect SSH port on CSF in Linux Mint 20

Introduction:

CNF is the Config Server Firewall, a free and high-level firewall for most of the Linux distributions and Linux based VPS. Besides, the basic functionality of a firewall – filtering packets – CSF includes other security features, such as login/intrusion/flood detections. This tutorial will cover to deny and redirect SSH port on CSF in Linux Mint 20.

Installation Procedure:

Check the version of the Linux Mint 20.

root@LinuxHelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20
Release:	20
Codename:	ulyana

Configure the SSH port on ssh configuration file

root@LinuxHelp:/usr/src/csf# vim /etc/ssh/sshd_config

snap1 Once the configuration is finished then restart the ssh service

root@LinuxHelp:/usr/src/csf# systemctl restart ssh

Now redirect the ssh port on csf to redirect file location

root@LinuxHelp:/usr/src/csf# vim /etc/csf/csf.redirect

snap2 Now add the ssh port to csf configuration file

root@LinuxHelp:/usr/src/csf# vim /etc/csf/csf.conf

snap3 Once the configuration is completed then restart the csf service

root@LinuxHelp:/usr/src/csf# csf -r
Flushing chain `INPUT'
Flushing chain `FORWARD'
Flushing chain `OUTPUT'
Flushing chain `ALLOWIN'
Flushing chain `ALLOWOUT'
Flushing chain `DENYIN'
.
.
.
*WARNING* Binary location for [SENDMAIL] [/usr/sbin/sendmail] in /etc/csf/csf.conf is either incorrect, is not installed or is not executable
*WARNING* Missing or incorrect binary locations will break csf and lfd functionality
*WARNING* RESTRICT_SYSLOG is disabled. See SECURITY WARNING in /etc/csf/csf.conf.

Once the service is restart then open ssh console and take ssh on the Linux machine. Now take the ssh on Linux Mint machine using redirect port the csf is allowed the port snap4 Here I am trying take ssh on my Linux Mint machine using ssh port the csf redirect the ssh port snap5 With this method, to deny and redirect the SSH port on CSF in Linux Mint 20 comes to an end.

Tags:
isaac
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is CSF(Config Server Firewall)?

A

CNF is the Config Server Firewall, a free and high-level firewall for most of the Linux distributions and Linux based VPS. Besides, the basic functionality of a firewall – filtering packets – CSF includes other security features, such as login/intrusion/flood detections.

Q

What is mean by SSH?

A

The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication, and it protects the communications security and integrity with strong encryption.

Q

From where do you change the ssh port?

A

The location is /etc/ssh/sshd_config

Q

From where do you add the ssh port on csf?

A

The location is /etc/csf/csf.conf

Q

From where do you redirect the ssh port on csf?

A

The location is /etc/csf/csf.redirect

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.