Developping a forwarding application

This is a general forum for discussing NT Kernel Resources products (their usage, features, applicability and etc.). Please use English or Russian languages for your posts.

Re: Developping a forwarding application

Postby Eldred on Mon Feb 01, 2010 7:29 pm

There are probably packets, because I can see them if I run the sample of packetsniffer... Maybe an initialization problem or something ?
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby SerpentFly on Tue Feb 02, 2010 3:24 pm

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.
User avatar
SerpentFly
Site Admin
 
Posts: 465
Joined: Wed Jul 26, 2006 12:22 pm

Re: Developping a forwarding application

Postby Eldred on Wed Mar 10, 2010 2:08 pm

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.
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby Eldred on Fri Mar 26, 2010 4:31 pm

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 ?
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby SerpentFly on Mon Mar 29, 2010 9:01 pm

If to be honest I already lost the idea of where you are in your development. Could you describe the particular problem in details?
User avatar
SerpentFly
Site Admin
 
Posts: 465
Joined: Wed Jul 26, 2006 12:22 pm

Re: Developping a forwarding application

Postby Eldred on Tue Mar 30, 2010 11:14 am

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.
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby Eldred on Wed Apr 07, 2010 10:39 am

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.
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby SerpentFly on Sat Apr 10, 2010 12:55 pm

- 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.
User avatar
SerpentFly
Site Admin
 
Posts: 465
Joined: Wed Jul 26, 2006 12:22 pm

Re: Developping a forwarding application

Postby Eldred on Sun Apr 11, 2010 6:02 pm

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 ?
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby Eldred on Tue Apr 13, 2010 3:42 pm

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.
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby SerpentFly on Tue Apr 13, 2010 4:50 pm

How can I do to obtain this certificate ?


An example from VerySign http://www.verisign.com/code-signing/co ... 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.
User avatar
SerpentFly
Site Admin
 
Posts: 465
Joined: Wed Jul 26, 2006 12:22 pm

Re: Developping a forwarding application

Postby Eldred on Wed Apr 14, 2010 9:47 am

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 ?
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby SerpentFly on Wed Apr 14, 2010 3:17 pm

Fro 32 bit systems yes, but for Vista/7/2008 x64 you can't load unsigned driver unless you load system in special mode.
User avatar
SerpentFly
Site Admin
 
Posts: 465
Joined: Wed Jul 26, 2006 12:22 pm

Re: Developping a forwarding application

Postby Eldred on Wed Apr 14, 2010 4:08 pm

Ok I see, I read that in another thread but didn't remember. Thank you again for those information.
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

Re: Developping a forwarding application

Postby Eldred on Thu Apr 15, 2010 1:51 pm

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 ?
Eldred
 
Posts: 23
Joined: Mon Jan 11, 2010 5:54 pm

PreviousNext

Return to NT Kernel Resources Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron