LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set up Firewall correctly for a TCP Client .EXE?

Solved!
Go to solution

Hello,

I have a simple tcp server VI and tcp client VI and for each an .EXE. If I use my ServerEXE on PC1 and my ClientEXE on PC2, there is no Problem, the Connection works. But when I try to use the ServerVI on PC1 and the ClientEXE on PC2 it only wroks, when I disable the firewall on PC1. ClientVI+ServerEXE works fine, though.

So how do I set up my Firewall correctly? I can't just add rule for the ClientEXE, because... you know... it is on the other PC.

0 Kudos
Message 1 of 5
(3,502 Views)

As I remember when I had similar issue, I had to open certain ports (or port range):

http://www.ni.com/white-paper/12402/en/

0 Kudos
Message 2 of 5
(3,501 Views)
Solution
Accepted by topic author s_bohn

Hi!

 

I sound to me that one computer can not open the required port. The server application probably has a constant port, so the client has to connect to that port. If you havent changed the default settings the client will automatically decide on a client port. It could be that the client can find a dynamic port that is not blocked, whereas the server has a constant port that is blocked.

So what to do: Unblock the port (if you can) or use another port that is already open.

 

You have to open the port for the application on the computer which uses the port. So add a rule on the computer that blocks the connection (I guess that should be the server).

 

Regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 3 of 5
(3,442 Views)

hm.. I'm not sure...

I always set the same port on the client and server application. And I only have a problem when I try to get a connection between ClientEXE and ServerVI...

In short (all using the same port):

ClientEXE <--> ServerEXE - Ok

ClientEXE <--> ServerVI - Problem!

ServerEXE <--> ClientEXE - Ok

ServerEXE <--> ClientVI - Ok

0 Kudos
Message 4 of 5
(3,436 Views)

Ok, I just tested it again and now when and as soon as I started the serverVi the automatic message for the Firewall appeared, I accepted and now it works... I don't know why it didn't happen yesterday. So yeah, you were right.

Thank you!

0 Kudos
Message 5 of 5
(3,427 Views)