yum install -y wget cd /etc/yum.repos.d/ sudo wget http://download.opensuse.org/repositories/home:zhonghuaren/Fedora_23/home:zhonghuaren.repo yum install -y ufw echo y | systemctl enable ufw echo y | systemctl start ufw chkconfig ufw on ufw enable ufw status ufw default deny incoming ufw default allow outgoing ufw status
Many Thanks to SuperUser
2 Comments
Anonymous
New Path!!! http://download.opensuse.org/repositories/home:/zhonghuaren/Fedora_25/home:zhonghuaren.repo
Anonymous
for using systemctl you must edit the file /usr/lib/systemd/system/ufw.service
add following
Copy from Ubuntu Server 16.04
[Unit] Description=Uncomplicated firewall DefaultDependencies=no Before=network.target
[Service] Type=oneshot RemainAfterExit=yes ExecStart=/lib/ufw/ufw-init start quiet ExecStop=/lib/ufw/ufw-init stop
[Install]
WantedBy=multi-user.target