Developing a forwarding application

Home Forums Discussions Support Portal Developing a forwarding application

This topic contains 38 replies, has 2 voices, and was last updated by  Eldred 9 years, 2 months ago.

Viewing 15 posts - 16 through 30 (of 39 total)
  • Author
    Posts
  • #6885

    Eldred
    Participant

    There are probably packets, because I can see them if I run the sample of packetsniffer… Maybe an initialization problem or something ?

    #6886

    Vadim Smirnov
    Moderator

    Your applications tries to read packet only one time and then exits if fails to read one, while packetsniffer and passthru wait for packets to be available. This is the difference.

    #6887

    Eldred
    Participant

    I’ve been busy on another project this last month and haven’t post feedback. I finally managed to read packets and forward them to another interface.
    But for what I want to do, I need to have more precise rules. For example, I want to forward packets according to their source IP.

    If source IP == xx.xx.xx.xx, then forward, else let the packet go.

    In order to use SendPacketToAdapter correctly, I need to set the mode to MSTCP_FLAG_SENT_TUNNEL| MSTCP_FLAG_RECV_TUNNEL. Am I right so far ?

    But if I do so, every packet will be blocked. So I guess I need to setup filter rules. As I could read from the doc and the filter sample, everything I want to do is possible. I just have a question about how to use this : do I need to setup filter rules first, and then the ReadPackets function will only “see” packets whose filter action was “FILTER_PACKET_REDIRECT” ?

    I don’t know if I was really clear, just tell me if I wasn’t.

    #6888

    Eldred
    Participant

    Not many movement here since my last post, but I tell where I am now anyway. I set up filters and I can redirect the packets I want to the adapter I chose. This tool is really powerful and quite easy to use. Anyway, I still have a question : what kind of packets are the forwared ones ? I mean, I send the packets through a virtual adapter (VirtNet adapter) which is used by a VM. If I perform a tcpdump into the VM (Debian-based), I can see the packets ; but if I do netfilter rules, I can’t see anything. Any reason to this ?

    #6889

    Vadim Smirnov
    Moderator

    If to be honest I already lost the idea of where you are in your development. Could you describe the particular problem in details?

    #6890

    Eldred
    Participant

    I want to redirect packets outgoing from an interface through another one in order to be filtered by an existing system. The problem I had was that I managed to forward packets, but they weren’t filtered by the destination machine.
    Using WireShark to analyze the packets, I saw that the destination MAC address wasn’t the one from the machine but the one from the gateway the packet should have use in its normal route.

    I misunderstood the difference between routing packet and copying it to another interface. So I changed the destination MAC and it works.

    Now I know how to use it, I can confirm, your job is really great !

    Thank you SerpentFly for the help you provided my through this thread.

    #6891

    Eldred
    Participant

    My application is almost over ; I still have some little questions but I guess there is no solution with you API :

    – I need to forward packets for WAN links or interfaces ; in order to do NAT I need to know what is the IP of this interface/connection. For the connection, I can use the RAS_LINKS structure. But is there another way for the interface than looking in the registry with the device ID ?

    – I also need to know the DNS server(s) from these interface/connection. For the interface I can look into the same key of the registry ; but for the connection, I don’t know how to find it (the information is also in the registry, but how can I proceed to know its ID ?)

    Since I know now I can use your driver and API, I’ll have to purchase it. How does it work after, I download a package containing all tools to install it or so ? I’d need to perform a silent install of the driver, is this possible ?
    Other question, are the sources of the VirtNet adapter available in this package ? It would be nice if I could rename it with the name of my company.

    Thank you for your answers.

    #6892

    Vadim Smirnov
    Moderator

    – I need to forward packets for WAN links or interfaces ; in order to do NAT I need to know what is the IP of this interface/connection. For the connection, I can use the RAS_LINKS structure. But is there another way for the interface than looking in the registry with the device ID ?

    – I also need to know the DNS server(s) from these interface/connection. For the interface I can look into the same key of the registry ; but for the connection, I don’t know how to find it (the information is also in the registry, but how can I proceed to know its ID ?)

    You can use IP helper API for these tasks, there is no way to do that with WinpkFilter driver.

    Since I know now I can use your driver and API, I’ll have to purchase it. How does it work after, I download a package containing all tools to install it or so ? I’d need to perform a silent install of the driver, is this possible ?
    Other question, are the sources of the VirtNet adapter available in this package ? It would be nice if I could rename it with the name of my company.

    Creating the silent installation for WinpkFilter driver is possible. The only important thing you have to care is obtaining code signing certificate and sign driver binaries to avoid Unknown Publisher warnings and allow WinpkFilter driver to load on Vista/7 x64 in normal mode. If you license WinpkFilter I will deliver you VirtNet source code for free.

    #6893

    Eldred
    Participant

    Great ! How can I do to obtain this certificate ? Will it be ok for the VirtNet source code if I purchage the developer update, since I have no modifications to do ?

    #6894

    Eldred
    Participant

    Another question about the licence ; if I pay once, I’ll have free support and upgrade for one year. But if my software runs well and I don’t need neither support nor upgrades, will I still have the right to sell my products using your driver or will I have to renew my subscription ?

    Another question, I don’t remember if the driver works with Windows 7 64 bits ; if it’s not the case will I have the new version if it’s released within one year ?

    Thanks.

    #6895

    Vadim Smirnov
    Moderator

    How can I do to obtain this certificate ?

    An example from VerySign http://www.verisign.com/code-signing/content-signing-certificates/microsoft-authenticode/index.html

    Will it be ok for the VirtNet source code if I purchage the developer update, since I have no modifications to do ?

    Yes, it will be ok.

    But if my software runs well and I don’t need neither support nor upgrades, will I still have the right to sell my products using your driver or will I have to renew my subscription ?

    No, you have not to renew after one year (and can continue to distribute your software) but you can purchase the renewal anytime when you really need some updates.

    Another question, I don’t remember if the driver works with Windows 7 64 bits ; if it’s not the case will I have the new version if it’s released within one year ?

    Windows 7 is already supported.

    #6896

    Eldred
    Participant

    Thank you for your answers. But I have a last question about the certificate : if I don’t have one, will the silent install work anyway ? I mean, there will be a warning but if the user accepts it it should be ok right ?

    #6897

    Vadim Smirnov
    Moderator

    Fro 32 bit systems yes, but for Vista/7/2008 x64 you can’t load unsigned driver unless you load system in special mode.

    #6898

    Eldred
    Participant

    Ok I see, I read that in another thread but didn’t remember. Thank you again for those information.

    #6899

    Eldred
    Participant

    Oh, I forgot ; I was about to purchase a licence but I need to have this last answer : will I receive a bill after having payed ? I will absolutely need one with my name and the one of my company. I guess it’s the case but I can’t pay before to be sure.

    Actually my case is a bit complicated ; is there a way to contact you by phone ?

Viewing 15 posts - 16 through 30 (of 39 total)

You must be logged in to reply to this topic.