1

I'm looking for some enlightenment / validation on the best way to approach this problem.

I've several measurement devices that are connected to a computer (call it the "main" computer) using Ethernet cables and a simple switch. That computer then responds to data requests from other computers in the same LAN, using a specific protocol, on a specific port, and sends that data (originated from the measurement devices) back to those computers using the same protocol and port. To clarify, the other computers never communicate directly with the measurement devices and only get data from the "main" computer. The problem is that in some locations, due to some rigorous security options that I've no access to, there is only one LAN IP address and one network cable/port available to connect the measurement devices and the main computer.

Since the main computer acts as a link between the other computers in the network and the measurement equipments, I'm thinking that this could be solvable using NAT and Port Forwarding: get a router, connect the available LAN cable to it's WAN port, and set it up to use the only available LAN IP as it's WAN IP. Then connect the main computer and measurement devices to the router (directly or using a switch) in order to create a subnetwork managed by the router, and have it forward all requests on the protocol port to the "main" computer.

Now there are a few things in this configuration that I'm not sure will work, namely using a LAN IP as a WAN IP, and would appreciate input from someone with more knowledge.

The Main computer runs Windows 10 Pro, and I'm also wondering if the computer could act as the router (meaning adding NAT capabilities to Windows 10) instead of adding an actual router to the configuration, which might be a bit of an overkill for what is needed.

3
  • Can you add a simple diagram? When you only have one port, do you plug it into the switch or the main PC, and does the main PC have two ports? You will not need NAT or port forwarding if the other computers don't connect directly to the measurement devices.
    – Cpt.Whale
    Commented Oct 18, 2023 at 18:10
  • Thank you for your reply. I'll add a diagram later, but to clarify, the issue is not really having only one port available (that would be solvable using a switch), the issue is having only one LAN IP address available for the main computer + X measuring devices (there's no DHCP, and all IPs are manually assigned). At the moment when that happens the data is just dumped to a file on the main computer and then that file is sent to the other computers via e-mail, pen drive, sd card, etc. Commented Oct 19, 2023 at 12:03
  • If the measurement devices don't need to connect out to the internet/*through* the main PC, then you can just assign them to any private network IP like 172.17.0.X. Give the main PC an additional IP in the same subnet, and they'll be able to communicate directly just fine without additional configuration
    – Cpt.Whale
    Commented Oct 19, 2023 at 14:06

1 Answer 1

2

Yes, that's exactly what NAT is for.

Yes, you could use a dedicated router, even the cheapest consumer home gateway router, to do this.

Yes, you could use Windows' built-in Internet Connection Sharing feature to make your Windows box act as the NAT gateway.

Yes, a NAT gateway can have RFC 1918 private subnets on both its LAN and WAN sides. They need to be different subnets though, but since you're in control of the NAT gateway you're setting up, you can always pick a different subnet for the LAN side of your NAT, different than whatever subnet is in use on the larger LAN that you're connecting it to.

2
  • This answer appears to me to be helpful here. +1
    – anon
    Commented Oct 18, 2023 at 18:46
  • Thank you for your reply, and for validating some of the doubts I had. Regarding the different subnets, I've seen wireless routers that don't allow LAN IPs on the WAN settings, from your answer I'm guessing this should not be the norm? Also, I've checked Windows Internet Connection Sharing. It seems that it basically turns Windows 10 into a Wi-Fi Hotspot, and I'm looking for a cabled solution. Commented Oct 19, 2023 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .