You can configure your agents in two ways:
Agent to Server connection
Server to Agent connection
Option 1 will require certificates and agent tunnels (see https://www.netxms.org/documentation/adminguide/server-management.html#server-configuration-for-agent-to-server-connection-tunnel-connection). This setup is a bit more involved, but makes a lot of sense if you are connecting to agents behind routers/firewalls which the NetXMS server cannot talk to directly.
Option 2 will simply require the NetXMS server be able to talk to your NetXMS agent on TCP port 4700. If you have a VPN between your server and the Agents, that's probably the easiest setup. Just make sure your Windows firewall doesn't block the incoming connection from the NetXMS server to your agent. You won't need the ServerConnection parameter for this either, MasterServers is enough.
I recommend reading through the documentation to get a better idea on how the above work: https://www.netxms.org/documentation/adminguide/agent-management.html#