Sign in to follow this  
Followers 0
Kaelin

TCP/UDP Listening

4 posts in this topic

Hello! I've been thinking and trying to make a simple firewall app for my server but I couldn't guess where to start. If this is even possible. I would like to make a small application that will simply listen to the port 26000. And every time data comes in through this port it would log the IP into a field in the same window. Is this part possible? I worry that if AutoIt is listening it will take the packet and dump it before it reaches its destination.

Also, is it possible for AutoIt to check the data for a specific packet and would only allow it if it contained the correct array of bytes. Kind of like a firewall. I will keep looking into the commands and try to work out a solution, but it would be nice for some opinions from others who have possibly done this before ;) Any help is much appreciated!

Hope you all had a great new year :evil:

Share this post


Link to post
Share on other sites



Only one socket can listen on a given port and IP address at a time. Your application would fail to begin listening if the other application were already running.

Share this post


Link to post
Share on other sites

Ah I see... Understandable. This might sound odd but, would it be possible for my application to listen to port 27000 and then send that connection to port 26000 if conditions are met? Probably not I suppose.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Yes. You would need one socket to listen, and for every "valid" connection, you make a new outgoing socket to the other application.

You would need to read all incoming data and copy it to the outgoing socket.

Edited by Richard Robertson

Share this post


Link to post
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
Sign in to follow this  
Followers 0