Search code examples
linuxnetwork-programmingflaskiptablesufw

What are some reasons IPTable command works but UFW doesn't?


I'm trying to launch a flask app, which runs on default port: 5000. Initially, I tried to allow for open connections with ufw under the following configuration: enter image description here

However, all remote requests were being refused. I eventually ran the following command: iptables -I INPUT -p tcp --dport 5000 -j ACCEPT, which then allows for all commands.

I have two separate questions. 1. Why did the iptables command work but the ufw configuration not work? 2. My current process for deploying the app is: 1) launch screen session 2) run IPTables command 3) run python app.py 4) detach from screen. This seems to do the job initially, but after a while, the app begins to refuse connections. Any thoughts on why this might happen?


Solution

  • The problem was that the VM was configured to use a puppet server, so ufw was being ignored/overwritten entirely.