sudo iptables -L
If there are no existing rules specifically blocking port 8080, proceed to the next step. Otherwise, you may need to remove or modify the existing rules that are blocking the port.
Add a new rule to allow incoming connections on port 8080 by running the following command:
css
Copy code
sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
This command appends a rule to the INPUT chain, allowing TCP traffic on port 8080.
Save the iptables rules so that they persist across reboots by running the command:
javascript
Copy code
sudo iptables-save > /etc/iptables/rules.v4
This command saves the current iptables rules to the specified file.
Optionally, you can also allow the port in the ufw firewall if it's enabled. Run the command: