How to use UFW in CentOS

Source: Internet
Author: User

UFW は ファイアウォール the Management ツール で, Ubuntu the で standard occupies makes the われています. UFW allow 80/tcp のような simple single なコマンドでポートを けます off めできます.

CentOS with のパッケージは intention されていませんが, ソースから インストール すれば makes えます.

% sudo Yum Install wget Make
% wgethttps://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz
% tar xzf ufw-0.33. Tar . gz
% CD UFW-0.33
% sudopython ./setup.py Install
% sudo chmod-r g-w/etc/ufw /lib/ufw /etc/default/ UFW /usr/sbin/UFW

the final 1 Line は" WARN:/etc/default/ UFW is group writable! "という warning すために necessary ですので to eliminate.

[UPDATE] wget とmakeパッケージをインストール able Hand and えました. また, バージョン を0.32から0.33に slew more しました. (2012/12/22)

from < http://d.hatena.ne.jp/tkrd/20120720/1342760963 >

* at this time, /etc/init.d/iptables Status displayed UFW the rules are actually being lined up CentOS in the back of the tacit rules, you need to modify:

/etc/sysconfig/iptables To (Cancel CentOS self- bringing rules)

# firewallconfiguration written by System-config-firewall

# Manualcustomization of this file are not recommended.

*filter

: INPUT ACCEPT [0:0]

: FORWARD accept[0:0]

: OUTPUT ACCEPT [0:0]

#-a input-m state--state established,related-j ACCEPT

#-a input-p icmp-jaccept

#-a input-i lo-jaccept

#-a input-m state--state new-m tcp-p tcp--dport 22-j ACCEPT

#-a input-j Reject--reject-with icmp-host-prohibited

#-a Forward-jreject--reject-with icmp-host-prohibited

COMMIT

How to use UFW in CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.