Posts

Showing posts with the label C stun program

Send a TCP/UDP request to STUN server using C language

Image
In this post I will tell you how you can send a binding request to any available free STUN server using a C program Step 1 - You will need a LINUX environment to run the code so you can either use a LINUX operating system or you can use WSL. Step 2 - Now you need to run the C code given below, type " gcc stun.c " to run the   code where stun.c is the file name , it will generate an executable file a.out Below is the screenshot showing how to compile the code. Step 4 - Now you need to run the executable file a.out you need to type ./a.out <STUN server IP> <STUN server PORT> <local PORT> on your terminal below is the screenshot for your refrence As you can see in the above screenshot it is showing my public IP  and PORT