Please help I can’t seem to get this to work.
What I have is a Linux 2.6 box with 2 Nic’s eth0 and eth1.
Eth0 is set at IP 192.168.1.66 and is part of a large network.
Eth1 base net of 192.168.5.0 with the Linux box at .5.1 and is running DHCP server for the limited computers on it’s network.
What I want to do, is from a computer on the 192.168.1.0 network say 192.168.1.104 to access the computer on the .5.0 network say 192.168.5.10 but I only what port 5900 to go to .5.10 and port 5901 to go to .5.11 port 5902 to .5.12 etc. and no other ports to go though. And Yes I am using VNC and trying to get from .1.104 to .5.17 the simplest way possible.
What I am doing is using NAT and port forwarding but I can’t seem to get it to work. It seems it should be exactly backward of the standard “many box’s” accessing “the one” (i.e. internet).
Does any one think that I would have to setup a VPN and go that route?
The entry in iptables is.
-A PREROUTING –t nat –p tcp –d 192.168.1.66 --dport 5900 –in-eth0 –j DNAT –to 192.168.5.17:5900
Do you have a router also? You may need to open/forward ports from there also. Other than that, I don't have any Idea.
No external router, and thanks for the look over. Since nobody has any Ideas, I think maybe this is not possible. I think I'll try VPN
Thanks everyone for looking :)