Jump to content

Prevent direct connection to local port


enqbcvqw

Recommended Posts

enqbcvqw

I just noticed that my android phone app connects directly via my local port even when I have an external domain set up so I do not want this to happen.

 

If I block my local port using iptables the server becomes inaccesssible.

 

What do I need to do to ensure the apps connect via WAN access with my external domain and that way only?

 

Thanks

EDIT: well, I'm not sure if this is the best way, but binding to 127.0.0.1 and adding an iptables rule to REJECT my local port over my WAN IP worked. The app still seems to try to connect but it retries over the proper hostname after the connection is refused.

Edited by enqbcvqw
Link to comment
Share on other sites

When you're inside your local network it will try to use the LAN address. Is that really a problem?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...