Sunday 17 April 2016

open a port in linux using firefall-cmd

open a port in linux using firefall-cmd.

before running the command install firewalld package.

1) install the firewalld on linux
cmd : yum install firewalld
2) check status.
cmd : systemctl status firewalld
if it is not enable, enable it.
cmd : systemctl enable firewalld
3) if it not started start it.
cmd : systemctl start firewalld

4) stop the firewall
cmd : service firewalld stop



Now we have to open the port which will visible to public
open port :
cmd : firewall-cmd --zone=public --add-port=8090/tcp --permanent

reload the service :
firewall-cmd --reload

check whether the port was added to ipatables rules:
iptables-save | grep 8090

REF :
1) liquidweb
2) linuxconfig

No comments:

Post a Comment