Forwarding Ports on Centos 7
I just found a way that made this possible for me:
firewall-cmd --zone=public --add-masquerade --permanent
firewall-cmd --zone=public --add-forward-port=port=443:proto=tcp:toport=3001 --permanent
Related videos on Youtube
zzzsys
Updated on September 18, 2022Comments
-
zzzsys almost 2 years
I'm working on a CentOS 7 server and I'm trying to get JBoss to work the way I want it too. I'm running Java 8 and JBoss(wildly) 8. I have gotten those installed and working on the default ports, but I want to get JBoss to work on port 80. I know I can get it to work on port 80 if I run it as root, but I know that isn't a good idea and I don't want to run it as root any way.
I have tried forwarding port 80 to 8080, but I haven't gotten it to work. I think I'm missing a step, but I don't know what I'm missing.
I'm using firewall-cmd. I have opened up both ports (80 & 8080) and I have enable masquerading for public zone. I have also used this command to forward the port
firewall-cmd --zone=public --add-forward-port=port=80:proto=tcp:toport=8080.
Any idea what I'm missing?
-
Michael Hampton over 9 yearsWhat's wrong with running httpd or nginx in front of it?
-
zzzsys over 9 yearsNothing, I was trying to not do it that way if I could help it.
-
-
zzzsys over 9 yearsThank you, I will check that out. The connection is from an external source.
-
Guru over 7 yearscorrect +1 for you. I had to do lot of struggle to get here.
-
Steve Yakovenko about 5 yearsFirewallD is not running
-
just_user about 5 years@SteveYakovenko then starting it is a good first step.