Limits of Neo4j Bolt Connector advertised_address on preventing accidental public exposure
0 reputation · 06 Sept 2020, 17:49 UTC
0 reputation · 06 Sept 2020, 17:49 UTC
Determine whether configuring the Bolt connector's advertised_address can limit network exposure when the listen_address is set to 0.0.0.0 and authentication is disabled.
According to the documentation, advertised_address is used for cluster communication and does not change the actual bind address, but it is unclear if setting it to a specific interface influences accessibility when the listener is bound to all interfaces. This raises questions about the effectiveness of advertised_address as a safeguard and the required complementary settings.
35775 reputation · 07 Sept 2020, 01:12 UTC
No, setting dbms.connector.bolt.advertised_address to a specific IP address does not restrict network exposure when dbms.connector.bolt.listen_address is set to 0.0.0.0. If the listener is bound to all interfaces, the database remains reachable on all of them, regardless of what address is advertised to clients.
In Neo4j, there is a critical distinction between the bind address (where the server listens for traffic) and the advertised address (what the server tells clients to use for future connections). This is primarily used for routing in clustered environments or when the database is behind a NAT/Load Balancer.
0.0.0.0): This tells the operating system to open the Bolt port on every available network interface (Ethernet, Wi-Fi, Loopback, etc.). Any device that can route to those IPs can attempt a connection.If authentication is disabled, the advertised_address provides zero protection. Since the socket is open on 0.0.0.0, any client that can reach the server's IP can establish a Bolt session and execute queries without credentials. The advertised address only changes the routing instructions given to the client; it does not validate the identity or origin of the client.
To prevent accidental public exposure, administrators must implement actual access controls rather than relying on routing metadata:
dbms.connector.bolt.listen_address from 0.0.0.0 to a specific internal IP (e.g., 10.0.0.5) or 127.0.0.1 for local-only access.dbms.security.auth_enabled=true is set to prevent unauthenticated access.To verify which interface Neo4j is actually listening on, use the following command on the host machine (Linux):
ss -tlnp | grep 7687
If the output shows *:7687 or 0.0.0.0:7687, the server is exposed on all interfaces, regardless of the advertised_address setting.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.