LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a firewall

Solved!
Go to solution

Hi to all. Anyone knows how to create a sort of firewall with LabVIEW? I'd like to block access to a third party software of some of ports and manage and forward the message on my own. I need to built a sort of a gateway/firewall. I have a NMS (Network Management System) and I don't want that NMS to deal with SNMP devices directly but through my software.

Thank you in advance

0 Kudos
Message 1 of 10
(4,789 Views)
Why not just use a regular firewall? It's not clear from your description why you need to do this with LabVIEW. Besides, out of the box LabVIEW does not provide TCP/IP access down to the packet level. To do that you would need to hook in to use WinPCap.
0 Kudos
Message 2 of 10
(4,780 Views)

Hi.

I want LabVIEW to act as a firewall because my NMS has some limitations (snmpV1 only) and I want to extend its features with LabVIEW. I need to pass all packets through LV before reaching my NMS and viceversa. LV will process the information before sending it.

Hmm winpcap, I heard this name when I installed wireshark! I'll check.

Thanks
0 Kudos
Message 3 of 10
(4,748 Views)
Anyway when using WinPcap in LV how can I block trafic from reaching my NMS before processing it?
0 Kudos
Message 4 of 10
(4,743 Views)

What you are basically looking to do is to have LabVIEW act as a proxy server. In essence you have to have LabVIEW listen constantly on a TCP/IP port, and to analyze the packets and determine whether they should be passed along. Your clients have to be configured to use a proxy server set to the IP address for the computer that's running the LabVIEW program and to the port that the LabVIEW program is listening on.

 

This is a complicated affair. I would suggest looking into just getting a third-party proxy server that you can easily configure to do what you want. 

Message 5 of 10
(4,718 Views)

A proxy it is not a bad idea, but I don't want just to block or pass the packets. I want also to modify the information. For example: my NMS accepts SNMPv1 only so I'd like to transform SNMPv2 messages into v1. I don't think that third party proxy servers can handle this.

So I can build an application acting listenning on specific ports and set this application as a proxy server (on IE settings)...not a bad idea!

May the proxy server run on the same PC with my client?

0 Kudos
Message 6 of 10
(4,693 Views)

Yes, the proxy server can be on the same machine.

 

If you go down this route then I would suggest considering doing this in another language. LabVIEW is great and all, but it's not suitable for all tasks. I think this would be one task in which you'd probably be better off programming in another language that is capable of dealing with raw packets. 

0 Kudos
Message 7 of 10
(4,679 Views)
Solution
Accepted by topic author flori2
Hi, this is the solution I got: use winpcap to capture SNMP packets and windows's IPsec utility to block the incomming packets from reaching my NMS. Winpcap still works despite IPsec policy.
0 Kudos
Message 8 of 10
(4,605 Views)
...and still using LabVIEW
0 Kudos
Message 9 of 10
(4,600 Views)
Thanks for following up and indicating what you found to work. Glad to hear you found a solution.
0 Kudos
Message 10 of 10
(4,582 Views)