port redirection

Home Forums Discussions General Discussion port redirection

This topic contains 5 replies, has 2 voices, and was last updated by  Vadim Smirnov 11 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5023

    g3gg0
    Participant

    hiho 🙂

    i want to code a library/routine/service/anything which intercepts the TCP
    data sent to port 25 and redirects that data to lets say port 10025.
    some other service at port 10025 then does *some work* on the data and sends it
    internally to the *real* port 25.

    is there a chance to configure windows’ firewall to redirect data sent from
    an external interface to port 25 to our port 10025?

    does anyone have an idea how to solve this EXCEPT using custom LSP/TDI/NDIS drivers?

    thank you very much in advance 🙂

    #6049

    Vadim Smirnov
    Moderator

    is there a chance to configure windows’ firewall to redirect data sent from an external interface to port 25 to our port 10025?

    Windows built-in firewall does not support port redirecting services.

    does anyone have an idea how to solve this EXCEPT using custom LSP/TDI/NDIS drivers?

    Regretfully there is no other way. You can use WinpkFilter library (http://www.ntkernel.com/w&p.php?id=7) to implement port redirector solution though.

    #6050

    g3gg0
    Participant

    thanks so far 🙂

    is it possible to get that port redirect dynamically upon startup of “my_app”?

    i want the user to start my program and just *then* it should care
    for some ports and filter them.
    if the user is shutting down my_app, it should disable port redirections
    and the user’s system should be in the state is was before.

    b.r.

    #6051

    Vadim Smirnov
    Moderator

    is it possible to get that port redirect dynamically upon startup of “my_app”?

    WinpkFilter driver should be installed on the system before hand. But in any case you start filtering/redirecting packets only when your application is active and stop this when your application is terminated. So the answer is YES.

    #6052

    g3gg0
    Participant

    since that app should be part of a kind of installer which gathers information
    about the local services and its usage, it is required that this port redirection
    is done without a prior reboot (to install your service) 🙁

    the system on which we “work” *must not* be rebooted at any time since
    its a productional system.

    is that doable?

    #6053

    Vadim Smirnov
    Moderator

    That can be a problem, dynamic hooking into system stack (with dynamically loadable NDIS IM driver under Windows 2000+ and dynamic hooking driver for earlier Windows versions) can be implemented bu it less reliable and more complex than static (in case of IM driver reboot still can be required in some cases).

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.