简体   繁体   中英

android app cannot connect to database if firewall is on

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM