* Can iptables REDIRECT traffic to a range of ports in one command?
@ 2004-04-19 21:25 Grace Li
2004-04-20 8:53 ` Henrik Nordstrom
2004-04-20 12:29 ` Ozgur AKAN
0 siblings, 2 replies; 3+ messages in thread
From: Grace Li @ 2004-04-19 21:25 UTC (permalink / raw)
To: netfilter-devel
Hi Guys,
I would like to intercept traffic to a range of ports, say port 2000-3000 to
one port locally, say port 3333. I am wondering if there is a simple way to
do it, like specify a range in iptables instead of writing a script to
speficy for each port?
Thanks,
Grace
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN Premium
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can iptables REDIRECT traffic to a range of ports in one command?
2004-04-19 21:25 Can iptables REDIRECT traffic to a range of ports in one command? Grace Li
@ 2004-04-20 8:53 ` Henrik Nordstrom
2004-04-20 12:29 ` Ozgur AKAN
1 sibling, 0 replies; 3+ messages in thread
From: Henrik Nordstrom @ 2004-04-20 8:53 UTC (permalink / raw)
To: Grace Li; +Cc: netfilter-devel
On Mon, 19 Apr 2004, Grace Li wrote:
> I would like to intercept traffic to a range of ports, say port 2000-3000 to
> one port locally, say port 3333. I am wondering if there is a simple way to
> do it, like specify a range in iptables instead of writing a script to
> speficy for each port?
>From the manual:
--destination-port [!] port[:port]
Destination port or port range specification. The flag
--dport is a convenient alias for this option.
Regards
Henrik
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can iptables REDIRECT traffic to a range of ports in one command?
2004-04-19 21:25 Can iptables REDIRECT traffic to a range of ports in one command? Grace Li
2004-04-20 8:53 ` Henrik Nordstrom
@ 2004-04-20 12:29 ` Ozgur AKAN
1 sibling, 0 replies; 3+ messages in thread
From: Ozgur AKAN @ 2004-04-20 12:29 UTC (permalink / raw)
To: Grace Li; +Cc: netfilter-devel
this is what you look for;
10.0.0.1 is the ip of destination machine
iptables -t nat -A PREROUTING -p tcp -d 10.0.0.1 --dport 2000:3000 -j
DNAT --to 10.0.0.1:3333
--
Ozgur Akan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-04-20 12:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 21:25 Can iptables REDIRECT traffic to a range of ports in one command? Grace Li
2004-04-20 8:53 ` Henrik Nordstrom
2004-04-20 12:29 ` Ozgur AKAN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.