Created
January 26, 2023 18:10
-
-
Save mariotpc/f4a20d6b7ad06d7cb4d107d436c5b79c to your computer and use it in GitHub Desktop.
firewalld port forward and expose ports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Be sure that FirewallD is running if not... start it ! | |
systemctl start firewalld | |
To expose ports to external access use | |
firewall-cmd --zone=public --add-port=22/tcp --permanent | |
firewall-cmd --zone=public --add-port=8080/tcp --permanent | |
To access outside to internal server, explicit port 2333 use | |
firewall-cmd | |
--zone=public | |
--add-forward-port=port=2333:proto=tcp:toport=2333:toaddr=10.20.10.20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment