<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Quazzi</i>
<br />Hi all
Been a while since I posted anything, anyway, need some help here. I'm trying to setup port forwarding on my router to aid the use of some applications. I'm using a Netgear DG814 and have tried an endless amount of ip-addresses in the port forwarding section.
Which IP Address do I setup for port-forwarding?? My setup is as follows - Server with 2 NIC's, 1 for router, one for network. Router IP address = 192.168.0.100; NIC2's IP Address 223.100.100.192. Router is default gateway for server.
Do I use the host machines IP address to forward or the router's or the wan address?????? Help would be greatly appreciated.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
If you have two NIC's in your server box, you should be working with three ip addresses as follows:
One ip address for the router which with the DG814 is 192.168.0.1 by default. This is the INTERNAL ip address of the router, but note that the router will also have an EXTERNAL ip address assigned by your isp. Typically, this will be in the 165.165 range.
The second ip address will be for the NIC to which the router is connected and should be obtained via the router's DHCP function so that it falls within the same range. If this is the only NIC that obtains its ip address via the router's DHCP, it will most likely be 192.168.0.2, though you can tell the router to start assigning ip addresses at any number provided the first part remains 192.168.0 For port forwarding to work, the ip address must be within the same range as the router's which is why it makes sense to do it with DHCP.
The third ip address will be for your second NIC and for security reasons should not be in the same range as the above. With my setup, I use the 192.168.1.* range and do a manual configuration for all the other machines on my lan. The ip address of the second NIC in the server is manually set at 192.168.1.1 and I use it as the default gateway (this involves using iptables to do forwarding and masquerading from the internal network [192.168.1.*] to the external network [192.168.0.2] and then from there to the router.
For incoming port forwarding, you need to direct to the external NIC i.e. 192.168.0.2 and make sure that your service is configured to run using that IP address. As an example:
To do web hosting using port forwarding, you need to make sure that your web server is running on 192.168.0.2. You then set up the DG814 to redirect all port 80 requests (the default port for http) to 192.168.0.2.
The above is just a brief description and the actual setup may be a bit more involved. The simple answer to your question is that you must forward to the ip address of the NIC that is connected to the router and the ip address must be in the same range as the INTERNAL ip address of the router,and you must make sure that the services that you want to make available are running on the same ip address, otherwise it does not work.
If you need more help, feel free to email me at
[email protected].
Cheers,
Vincent