I have deployed my spring boot app jar to centos server with this command:
nohup java -jar black-0.0.1-SNAPSHOT.jar > log_black.out &
In my application.properties I set the server port like this:
server.port=8181
Here is my IP table:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
128 10070 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8181
1007M 69G ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
17M 1155M ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
Now I can access to this port with local IP address (10.1.90.45:8181). But I can't access to it via public IP address. What should I do?