Hi. Please let me know on what Operating System you would like this to be done. Also, is the gateway reachable from the host where the program is written directly or are there any other routers in front?
Looking forward for your reply.
Best regards,
Alexander