ufw
नेटवर्क
इस्तेमाल
sudo ufw <allow|deny|status> ...Debian और Ubuntu पर iptables को आसान शब्दों में लपेटने वाला फ़ायरवॉल; `enable` से पहले SSH खोल लें वरना आप अपनी ही चालू सत्र काट देंगे, और Docker पोर्ट सीधे iptables में डालता है जहाँ ufw के नियम नहीं पहुँचते।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| allow 22/tcp | Open a port; allow OpenSSH uses the named application profile instead. |
| allow from 10.0.0.0/8 to any port 5432 | Open a port to one network only. |
| deny <port> | Block it explicitly. |
| default deny incoming | The usual starting point, set before you enable. |
| status numbered | List the rules with the numbers that delete needs. |
| delete <n> | Remove rule number n. |
| enable / disable | Turn the firewall on or off, persistently. |
उदाहरण
sudo ufw allow OpenSSH && sudo ufw enableAllow SSH first, then switch the firewall on.
sudo ufw status numberedSee what is open and get the rule numbers.
sudo ufw delete 3Remove the third rule.
कनेक्शन न बने तो ये बताते हैं कि बात कहाँ तक पहुँची — नाम हल नहीं हुआ, रास्ता नहीं, या पोर्ट बंद है।
कैसे पढ़ें
- बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
- तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
- विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।
आम सवाल
Q. ufw क्या करता है?
Debian और Ubuntu पर iptables को आसान शब्दों में लपेटने वाला फ़ायरवॉल; `enable` से पहले SSH खोल लें वरना आप अपनी ही चालू सत्र काट देंगे, और Docker पोर्ट सीधे iptables में डालता है जहाँ ufw के नियम नहीं पहुँचते।
Q. इसे कैसे लिखें?
sudo ufw <allow|deny|status> ... — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।
Q. कितने विकल्प जानने लायक़ हैं?
यहाँ 7 दिए हैं; पूरी सूची man ufw में है। यह कमांड नेटवर्क में आती है।
मिलती-जुलती कमांड
man पेज: man ufw