I have a VPS running an HTTPS admin service on TCP 5678.
I want to restrict this to OpenVPN users only and have tried the following:
iptables -A INPUT -s 10.8.1.0/24 -p tcp -m tcp --dport 5678 -m conntrack --ctstate NEW -j ACCEPT
Unfortunately this service is still open to the internet. How do i lock it down so only OpenVPN users can access it?
Can you state your operating system and distro name? Is it CentOS or Debian or Ubuntu? The firewall config depends upon it. What is the purpose of TCP 5678 port? Also paste output from:
Hey, be careful with firewall stuff when you are new. Wrong rule will lock down your server. Please investigate and find a list of all required TCP/UDP open ports for the server. By default, the ufw will blocks access to everything. So, you need to open all those ports before typing final: