LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP over Internet

Solved!
Go to solution

Hi Everyone, 

 

I have the same exact problem. On local network, using 192.168.x.xxx it works fine, but when I open ports, configure firewall etc, it does not work at all. 

 

Right now, the device is configured as server with port 23149, which IP 192.168.0.168 is DMZ, and my computer is the client, running the TCP communicator example (TCP client), but using public IP 5.154.114.180 and port 23149.

It should work, but connection its not etablished. Can anybody help ?? 

0 Kudos
Message 11 of 32
(1,647 Views)

Right.  So your router is allowing local private network 192.168.x.x addresses and is isolated with no routing from external addresses such as your  5.154.114.180.   Since you have not shown any routing/firewalls etc configuration it is hard to help.

 

You say all is set up correctly but it doesn't work.  It seems that if it isn't working then it is not setup correctly.

 

You need to have your router at LEAST do port forwarding as far as I can tell from the non-description of your setup.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 12 of 32
(1,633 Views)

Thanks for your reply,

 

Sure, something Its not well done for some reason. What info can be showed to provide further help? 

 

Thks.

Sebastian.

0 Kudos
Message 13 of 32
(1,630 Views)

@sth wrote:

You need to have your router at LEAST do port forwarding as far as I can tell from the non-description of your setup.


Defining a DMZ is port forwarding. it means that all incoming connections go to the DMZ server.

 

Is the client computer also on the local network? If so, you might not be able to reach the target because not all NAT routers implement a loopback proxy to allow that. You should try from a computer that is physically on the outside.

 

 

0 Kudos
Message 14 of 32
(1,628 Views)

Thanks!!! Very good advise.

 

A question, the TCP client requires port forwarding !? Or just the server?

 

I will try using two different networks. Thanks again!

0 Kudos
Message 15 of 32
(1,623 Views)

castek89 wrote:

A question, the TCP client requires port forwarding !? Or just the server?


Port forwarding is done on the router. It has nothing to do with client or server configuration.

 

  1. The client contacts the public IP of the router
  2. The router inspects the port forwarding rules and decides where the connection should go
  3. The router edits the packets with the new destination IP and port, places an entry in the NAT table, and puts the packet on the local network
  4. The server on the LAN responds and sends it to the gateway (the router in this case).
  5. The router edits the source IP and port of the outgoing packet to appear to come from the router and sends it to the client.

The server most likely has additional security settings that could block communications:

 

  • The firewall might need to be configured to allow the incoming connection.
  • The server settings might need to be configured
  • It might only accept connections from the same subnet by default, for example.
0 Kudos
Message 16 of 32
(1,620 Views)

There is a difference between DMZ/NAT/Port forwarding.  It doesn't really matter for this discussion.  NAT is just a dynamic management of the port forwarding based on an outgoing connection.

 

If you need some address outside your current local network to access the server then you need to set up a static port forwarding rule in your router.  This is true for connections from outside trying to start and establish a link inside.  You need to forward all incoming connections on port 23149 to go to your local server 192.168.0.168 on the same port.

 

You say that the server is DMZ.  DMZ is usually referred to as within the router not the server.  THere MUST be a router between the internet and your server on the private net.  You will have to contact your server as the public IP of that private subnet the server is on.

 

As Christian says, it is significant if you can contact the server on the same private net.

 

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 17 of 32
(1,603 Views)

Hi, thank you all,

 

Well, I have a router, which connect my local network to the internet. What I was trying to do is using public IP with computers in the same local network. I noticed that they must be different networks as routers cannot do loopback normally. 

 

Now, I´m trying to set my PC with labview as server, and configure the router as DMZ for the IP of my pc (the server), so all traffic goes to it. Then, I will bring my laptop home, which will be labview client. 

 

I dont know If I have to trigger ports of the router even if its configured as DMZ for my PC. 

 

Thanks again !!

0 Kudos
Message 18 of 32
(1,572 Views)

You need to be a lot more specific as to what you are trying to connect to what.  I can make some guesses but guessing wrong would just confuse things.  "using public IP" is not a clear statement of what and where you are trying to connect from and to and over what port.

 

If you have a DMZ you will have to manually set up port forwarding so that incoming packets are routed to the correct server.  You can set it such that all ports are redirected to a single machine on the private network.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 19 of 32
(1,562 Views)
You don't need port triggering.

Scott, DMZ is not used here in the classic way. On cheap consumer routers, a default forwarding rule that forwards all ports not otherwise defined to a specific IP is sometimes incorrectly called DMZ.
0 Kudos
Message 20 of 32
(1,545 Views)