Bash/Port/Forward

From Chorke Wiki
Revision as of 23:00, 10 June 2018 by Shahed (talk | contribs) (Created page with "'''Check Port is not used''' <syntaxhighlight lang="bash"> # check port 22200 fuser 22200/tcp # check port 55500 fuser 55500/tcp </syntaxhighlight> '''Enable Specific Port''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Check Port is not used

# check port 22200
fuser 22200/tcp

# check port 55500
fuser 55500/tcp

Enable Specific Port

firewall-cmd --zone=public --permanent --add-port=22200/tcp
firewall-cmd --zone=public --permanent --add-port=55500/tcp
firewall-cmd --reload
netstat

Enable Range of Port

firewall-cmd --zone=public --permanent --add-port=22200-22290/tcp
firewall-cmd --zone=public --permanent --add-port=55500-55590/tcp
firewall-cmd --reload
netstat

References