On Wed, 24 Apr 2002 19:35:47 -0400 Ramin Alidousti <[EMAIL PROTECTED]> wrote:
> http://www.netfilter.org/documentation/HOWTO//NAT-HOWTO-6.html#ss6.2 > > On Wed, Apr 24, 2002 at 06:29:09PM -0400, Mailing List wrote: > > > OK, since I can't find any HOWTOS, I'm going to have to ask my question here... > > > > How can I forward some ports to one of my boxes behind > > firewall/router/gateway? > > > > (My gateway/firewall/router is 192.168.1.1 local addy) > > (My other computers behind it are 192.168.1.77 and 192.168.1.177) > > (I want to forward ports 2000-2152 from my gateway to my second box) > > > > How about a range of ports? > > > > Please explain it in simple language so I can understand. > > > > Thank you, > > > > GRE > OK, that helped SOME, but how do I specify a bunch of ports to be forwarded? This does NOT work because '--dport' doesn't accept a range of ports, but this is what I tried: iptables -t nat -A PREROUTING -p tcp --dport 2090-2098 -i eth0 -j DNAT --to 192.168.1.77 It gave me the error: invalid TCP port/service `2090-2098' specified Also, is there a way to specify more than one IP after '--to' ? (like 192.168.1.77,192.168.1.177 for 192.168.1.77 and 192.168.1.177 only ?) I'm assuming that if I don't specify the ports after '-j DNAT --to' that it will use the same port as in '--dport', is this correct? (i.e. If I specify '--dport 2090' and specify '-j DNAT --to 192.168.1.77', will it forward port 2090 on the gateway to port 2090 on 192.168.1.77 ?) Thanks for your help, GRE
