android app cannot connect to database if firewall is on

696 views Asked by At

My app connects to local SQL Server using jtds. When I turn off the Windows Firewall, the application can access the local database. When it is turned on, it cannot access the local database. Does anyone know a way do let the app connect to local database without turning off the firewall.

Edit: tag added for sql-server

1

There are 1 answers

2
Drew On BEST ANSWER

Strictly speaking

Turn firewall on. Open port 1433

But typically you do not expose your database to the world. Best practices it is a no starter.

Rather, you would keep the port closed and the client layer is accessing port 80 to get aspx or php that would in turn (internal to your network) access the db.

So it is common to do that. But if you are just playing around different matter.