In this screenshot I am just showing the default firewall that is on for my Virutal Machine(VM). It can be found by simply searching for Windows defender firewall and then clicking Turn Windows Defender Firewall on or off on the left hand size of the screen.
I am going to create an Inbound rule for this firewall. On the right hand side of the screen I select New Rule and this screen comes up. Since we are configuring a Secure File Transport protocol(SFTP) rule and it runs on port 22 I will be selecting Port.
SFTP runs on TCP and port 22 so this screenshot is me just setting up some more specifics for the rule.
In this screenshot we are determining what should happen when a connection matches specified conditions. I opted to choose allow the connection if it is secure and require the connection to be encrypted. Since it is a SFTP I want to make sure the data being sent is encypted during this data transfer.
In this screenshot I am choosing when this rule applies and I am choosing for it to apply in all settings: Domain, Private and Public.
This screenshot just shows the Firewall is active and I named it "SFTP server". Now that this is completed I could theoretically set up an SFTP server and have anyone connect to it as long as the rules apply.
In this section I looked at Windows Defender Firewall on a windows 10 VM and added a new rule, a SFTP server rule. Windows defender makes it easy to look at and configure the firewall rules. I added a new rule, defined what port it was on, how it would be applied and when to allow it. This process can be done a number of times to help make any device have a stronger security posture.