What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
On a remote Ubuntu server, add the SSH rule before you enable UFW. For the normal SSH service, run:
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
sudo ufw allow ssh
sudo ufw status verbose
sudo ufw enable
sudo ufw status verbose
The first command permits the service name recorded for SSH (normally TCP port 22). If your SSH daemon listens on another port, substitute that port and protocol instead. Confirm the rule while your existing administrative session is still available, then enable the firewall.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteWhat the SSH rule does
Ubuntu identifies ufw as its default firewall configuration tool. UFW adds simple allow, deny, limit and logging rules to the host firewall. An SSH rule tells UFW which incoming connection should be accepted so that an SSH client can reach the daemon.
The familiar SSH endpoint is TCP port 22, but port 22 is not guaranteed. The daemon can be configured to listen on a different port, and the UFW rule must match that actual listener. A rule for the wrong port can be syntactically valid yet useless.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Service name, port and protocol
sudo ufw allow ssh uses the service name defined in /etc/services. The explicit equivalent for the usual endpoint is sudo ufw allow 22/tcp. Writing the port and protocol makes the intended match obvious and is useful when the service name is unavailable or when documenting a non-standard configuration.
Choose the rule that matches your situation
| Situation | Command | Effect and trade-off |
|---|---|---|
| Standard SSH service | sudo ufw allow ssh |
Uses the SSH service definition in /etc/services; convenient, but dependent on that service mapping. |
| Standard port, explicit TCP | sudo ufw allow 22/tcp |
Opens TCP port 22 directly and records the protocol explicitly. |
| Custom SSH port | sudo ufw allow 2222/tcp |
Replace 2222 with the port configured for your daemon; the protocol must match. |
| One trusted host | sudo ufw allow proto tcp from 192.0.2.10 to any port 22 |
Accepts SSH only from the specified address, reducing exposure. |
| Trusted network | sudo ufw allow proto tcp from 192.0.2.0/24 to any port 22 |
Accepts connections from the stated CIDR subnet rather than every source. |
| Connection-rate control | sudo ufw limit 22/tcp |
Uses UFW’s rate-limiting rule form instead of a plain allow rule. |
| Preview before applying | sudo ufw --dry-run allow 22/tcp |
Prints the rules that would result without changing the firewall. |
Use the least broad rule that remains operationally practical. An unrestricted allow rule is portable and quick, while a host or subnet rule limits who can reach the SSH port. A limit rule adds connection-rate control, and a dry run lets you inspect the generated change before applying it.
Recommended Free Tools
Safely open SSH before enabling UFW remotely
Enabling UFW on a machine you administer over SSH is the point at which an omitted rule can interrupt access. Add and inspect the SSH rule first, then enable UFW. The following sequence is the safe baseline for the standard SSH service:
-
Add the service rule.
sudo ufw allow sshThis creates an allow rule for the service name. If you prefer an explicit port and protocol, use
sudo ufw allow 22/tcpinstead. -
Inspect the planned active configuration.
sudo ufw status verboseRead the displayed rule and confirm that it represents SSH before changing the firewall state.
-
Enable UFW.
sudo ufw enableDo this only after the SSH rule is present. The allow rule is what preserves the intended SSH path when the firewall becomes active.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #2
SaleSmart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
-
Verify after activation.
sudo ufw status verboseCheck that UFW is active and that the SSH rule remains listed. Keep the current administrative session available while you test a new connection, rather than closing your only working path immediately.
Use a custom daemon port
If the SSH daemon is configured for a port other than 22, replace the service name or port in every relevant command. For example:
sudo ufw allow 2222/tcp
sudo ufw status verbose
sudo ufw enable
sudo ufw status verbose
The number 2222 is only an example. Use the port in your SSH daemon configuration. UFW accepts the PORT[/PROTOCOL] form, so include /tcp for an SSH TCP listener. Opening port 22 when the daemon listens on 2222 does not open the actual SSH endpoint.
Restrict SSH to a known address or network
A broad SSH rule permits attempts from any source that can reach the server. Where your administration path has a stable public address or a defined management network, add a source restriction instead.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallAllow one host
sudo ufw allow proto tcp from 192.0.2.10 to any port 22
This rule specifies TCP, the single source address 192.0.2.10, and destination port 22. Replace the example address with the trusted host that should administer the server. If SSH uses a custom port, replace 22 with that port.
Allow a subnet
sudo ufw allow proto tcp from 192.0.2.0/24 to any port 22
The CIDR suffix describes a subnet rather than one machine. Use this when administrators connect from addresses within a known network range. A subnet rule is broader than a single-host rule, so choose the narrowest range that still covers legitimate access.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Check the source-restricted rule
After adding either rule, inspect the result:
sudo ufw status verbose
Make sure the source address or CIDR, protocol and destination port are shown as intended. A source-restricted rule can leave you unable to connect if your current address is not the address you entered, so verify the management path before relying on it.
Preview a change with dry run
Use UFW’s dry-run option when you want to see the rules that a command would generate without applying them:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →sudo ufw --dry-run allow 22/tcp
The output is a preview only. It does not open the port. Once the preview matches your plan, run the same command without --dry-run and then verify the active configuration with sudo ufw status verbose.
Dry-run is particularly useful when changing a custom port, adding a source qualifier or checking the exact protocol expression before modifying a production host. It separates syntax and rule-generation checks from the actual firewall change.
Verify active rules and their order
UFW provides three status views, each useful at a different stage:
sudo ufw statusgives a concise list of active rules.sudo ufw status verboseincludes the firewall state and additional rule detail, making it the normal post-change check.sudo ufw status numberedprefixes rules with numbers, which is useful when you need to delete or insert a particular entry.
Use the numbered view before editing a configuration that contains overlapping rules. UFW evaluates matching rules in order. A broad rule placed before a more specific rule can affect which result is reached, so inspect the sequence rather than looking only for the presence of an SSH line.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
What to verify in the output
- The firewall is shown as active after
sudo ufw enable. - The SSH service, explicit port, or custom port you intended appears in the rules.
- The protocol is TCP when you used an explicit SSH rule.
- A restricted rule shows the expected source host or CIDR.
- Numbered output has the order you expect when both generic and specific entries exist.
Delete or replace an SSH rule
Remove a rule by prefixing the original rule expression with delete. For the explicit standard-port form:
sudo ufw delete allow 22/tcp
For a service-name rule, use the corresponding original expression:
sudo ufw delete allow ssh
If the rule includes a source restriction, repeat that complete expression when deleting it. Alternatively, use numbered status output and delete by rule number after confirming that the number identifies the intended entry. Inspect again with sudo ufw status numbered after the change.
Do not remove the only working SSH rule from a remote host until another valid rule is in place. When replacing an unrestricted rule with a source-restricted one, add and verify the restricted entry first, test it from the permitted source, and only then remove the broader entry.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use rate limiting for repeated connection attempts
The UFW manual documents a limit rule form for connection-rate control:
sudo ufw limit 22/tcp
Apply the same port substitution used for a custom SSH listener. A limit rule is different from a plain allow rule: it still defines the SSH endpoint, but asks UFW to control repeated connection attempts according to its limit behavior. Use it when you want an additional abuse-resistance measure and when that behavior is compatible with your administration pattern.
Best Value
Inspect the resulting rule with sudo ufw status verbose. Do not describe a limit rule as an IP allowlist; it does not replace a source restriction. If only a known host or subnet should connect, use the corresponding from expression.
Enable logging when diagnosing a rule
UFW supports log and log-all rule forms. These can be used when you need firewall records to understand whether traffic is matching a rule or being handled elsewhere. Add the logging form appropriate to the rule you are diagnosing, then inspect the active configuration with sudo ufw status verbose.
Logging is a diagnostic aid, not a substitute for opening the correct port. First ensure that the daemon’s configured port, protocol and source restriction are correct; then use logging to investigate unexpected matches or denials.
Troubleshoot common SSH access failures
The rule exists, but the client cannot connect
Compare the rule with the daemon’s actual listener. Confirm that you opened the configured port rather than assuming 22, and that the rule uses TCP. A service-name rule and an explicit rule can refer to different endpoints if your configuration or service mapping does not match your expectation.
The connection is refused
A firewall allow rule does not start the SSH daemon. If UFW shows the expected rule but the client receives a refusal, verify that the SSH service is running and listening on the same port you opened. Correct the UFW rule if the daemon was configured for a custom port.
The connection times out after enabling UFW
Check from the existing administrative session:
sudo ufw status verbose
Look for an active firewall and an SSH rule that matches the destination port and protocol. If you used a source restriction, compare the permitted address or CIDR with the address from which you are connecting. A source mismatch will not be fixed by adding more unrelated port rules.
A specific rule seems ineffective
Display numbered rules:
sudo ufw status numbered
Review the order for overlapping entries. UFW evaluates matching rules in order, so a generic entry can be encountered before a more specific one. Remove or reorder the unintended entry using its original expression or its confirmed rule number, then verify again.
The service-name command is unclear or unavailable
Use the explicit form and state the protocol:
sudo ufw allow 22/tcp
For a custom listener, substitute its configured port. This avoids depending on the SSH name in /etc/services and makes the intended endpoint visible in status output.
Quick Recap
A practical decision sequence
- Find the daemon’s configured port. Use 22 only when that is the actual SSH listener; otherwise use the custom value.
- Choose the source scope. Prefer a trusted host or CIDR when your administration network is stable; use an unrestricted rule only when broader reachability is required.
- Choose the expression. Use
allow sshfor the service-name form,allow PORT/tcpfor an explicit endpoint, or thefrom ... to any port ...form for source control. - Preview if the change is sensitive. Run the matching
--dry-runcommand and review its output. - Apply before enabling. Add the rule, inspect it, enable UFW, and inspect the active state again.
- Harden or troubleshoot. Consider
limit PORT/tcp, use logging while diagnosing, and consult numbered status output before deleting overlapping rules.
Command reference
| Purpose | Command |
|---|---|
| Allow the SSH service name | sudo ufw allow ssh |
| Allow standard SSH explicitly | sudo ufw allow 22/tcp |
| Allow a custom SSH port | sudo ufw allow 2222/tcp |
| Allow one source address | sudo ufw allow proto tcp from 192.0.2.10 to any port 22 |
| Allow a source subnet | sudo ufw allow proto tcp from 192.0.2.0/24 to any port 22 |
| Preview a rule | sudo ufw --dry-run allow 22/tcp |
| Show concise status | sudo ufw status |
| Show detailed status | sudo ufw status verbose |
| Show numbered rules | sudo ufw status numbered |
| Enable UFW | sudo ufw enable |
| Rate-limit standard SSH | sudo ufw limit 22/tcp |
| Delete an explicit rule | sudo ufw delete allow 22/tcp |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




