Setting Jboss EAP port 8443 to 443?

Latest response

I need setting Jboss EAP 6 for access port 443.

Great

Dennys

My setting standalone.xml part in attachment.

Attachments

Responses

Send file in attachment

It's not recommended because it requires root user to run EAP. Please consider using httpd as a reverse proxy.

Ok, but unable to solving logged without root this way:

  • Create in the /etc/xinetd.d a file jboss
  • With the following settings:

Redirects any requests on port 443

to port 8443 (where JBoss is listening)

service https
{
socket_type = stream
user = root
wait = no
redirect = 10.10.10.10 8443
disable = no
}

Redirects any requests on port 80

to port 8080 (where JBoss is listening)

service http
{
socket_type = stream
user = root
wait = no
redirect = 10.10.10.10 8080
disable = no
}

  • do a restart after the service : service xinetd restart

Although I agree with Takayuki that you should be putting the server behind a proxy, another solution (or at least way to achieve what you want) is using iptables.

iptables -I INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
iptables -I INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443

Because the PREROUTING port redirect is processed before the INPUT rules, the INPUT rules need to specify the 'real' port to accept incoming connections (if you have default DROP policy on INPUT).