Good day.
You can using firewall on your server.
If you use iptables, you can see the current rules:
Code:
sudo iptables-save -t filter
1. If the set policy ACCEPT (line :INPUT ACCEPT) and there are no other rules:
Code:
sudo iptables -A INPUT -p tcp \! -s <Allowed IP address> --dport 8443 -j REJECT
2. But if the INPUT chain ends with rule REJECT, for example:
then you need to add rule:
Code:
sudo iptables -I INPUT -p tcp -s <Allowed IP address> --dport 8443 -j ACCEPT