I want to set up a system where I have 3 computers 1 computer is a dhcp server and nfs and two other computers which run turbo vnc are connected directly to the dhcp machine. The dhcp machine is connected then to my router as its WAN. If I have the two machines behind the dhcp server both hosting vnc sessions how would I connect to either of those machines if I am connected over Ethernet or Wi-Fi from outside of that dhcp server. Please see the attached picture.
A and B are vnc host machines. The router is the WAN for the DHCP server and I am connected to the router.
What ports should I forward also what configurations do you suggest I use on the dhcp server or software. Thanks
You won't need to forward any ports to connect to anything on the wan side, just connect to their ip like normal. You wouldn't need to forward ports anyway as you're not sharing a single public IP, you can just open ports toyour destination address in the firewall. By default everything lan to wan is allowed and everything wan to lan is blocked.
So you don't need to do anything to access something on the wan side. Obviously both the wan and LAN networks will need to have different subnets.
Alright now take that model and apply it to the public internet the only difference now is the I am connecting from the outside world. Assuming I want to have 50 people connect to vnc sessions hosted in my house behind that dhcp server. Do I need to forward out 50 ports for each person or how will that be handled? Also can you give me some more specifics on the sub nets and the configurations I am trying to do this currently
You would need to forward the ports from the internet facing router to the vnc machines. You would only need to forward whatever ports it uses, I don't know anything about vnc so I can't be more specific.
If you have two networks connected by a router then they need to have different subnets, otherwise they are the same network and the router won't be able to do anything with that. So for example on the lan side you'd use 10.0.0.0/24 and on the wan side you'd use 10.1.0.0/24 or anything so long as they're both different subnets.
So assuming the dhcp server and the router are on different subnets if I want a machine from behind the dhcp server to host to someone outside of the network would two people need to use two different ports? I am trying to develop a web front end currently and I will automatically have a zero install system for their web browser. I am also using turbo vnc as my implementation. If I forward out port 5900 and I want two people to connect at what point does the system know to forward the traffic and at what point does the system diverge and reserve traffic?
The router's wan interface will be on the same subnet as the dhcp server and whatever else is on that side of the router, the lan interface will be on a different subnet along with everything connected on that side. It doesn't affect your port forwards, you just set whatever ip you want to forward to. You will however have to configure a static route on the internet facing router so it knows the network for the dhcp and vnc servers are behind the other router.
Also just know that in this configuration that dhcp server will only work for things on the wan side of the router.
As for vnc I have no idea how it works, I would assume that if it accepts multiple clients then you only need to forward one port and let the application work out which session is which, otherwise if you have to run multiple instances then they will all need to have their own unique ports.
Where do I begin learning about IP tables?