* [LARTC] iptables port forward
@ 2003-05-21 14:43 Tomas Bonnedahl
2003-05-21 14:51 ` Martin A. Brown
2003-05-21 14:57 ` Tomas Bonnedahl
0 siblings, 2 replies; 3+ messages in thread
From: Tomas Bonnedahl @ 2003-05-21 14:43 UTC (permalink / raw)
To: lartc
hello, quick question: i want to port forward those that enter at x:80 to internal address y:7865, how can i do that
with iptables?
iptables -t nat -I PREROUTING 4 -i eth0 -d x -p tcp --dport 80 -j DNAT --to y when/how do i specify port 7865?
thank you,
tomas bonnedahl
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] iptables port forward
2003-05-21 14:43 [LARTC] iptables port forward Tomas Bonnedahl
@ 2003-05-21 14:51 ` Martin A. Brown
2003-05-21 14:57 ` Tomas Bonnedahl
1 sibling, 0 replies; 3+ messages in thread
From: Martin A. Brown @ 2003-05-21 14:51 UTC (permalink / raw)
To: lartc
Hi there Tomas!
: iptables -t nat -I PREROUTING 4 -i eth0 -d x -p tcp --dport 80 \
: -j DNAT --to y when/how do i specify port 7865?
This should do the trick:
iptables -t nat -I PREROUTING 4 -i eth0 -d $PUB_IP -p tcp --dport 80 \
-j DNAT --to-destination $PRIV_IP:7865
Check out Oskar Andreeason's tutorial on this very matter.
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#DNATTARGET
Ciao for now,
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] iptables port forward
2003-05-21 14:43 [LARTC] iptables port forward Tomas Bonnedahl
2003-05-21 14:51 ` Martin A. Brown
@ 2003-05-21 14:57 ` Tomas Bonnedahl
1 sibling, 0 replies; 3+ messages in thread
From: Tomas Bonnedahl @ 2003-05-21 14:57 UTC (permalink / raw)
To: lartc
thank you martin.. i haven't tried it yet but i trust you ;)
best,
tomas
On Wed, May 21, 2003 at 09:51:10AM -0500, Martin A. Brown wrote:
> Hi there Tomas!
>
> : iptables -t nat -I PREROUTING 4 -i eth0 -d x -p tcp --dport 80 \
> : -j DNAT --to y when/how do i specify port 7865?
>
> This should do the trick:
>
> iptables -t nat -I PREROUTING 4 -i eth0 -d $PUB_IP -p tcp --dport 80 \
> -j DNAT --to-destination $PRIV_IP:7865
>
> Check out Oskar Andreeason's tutorial on this very matter.
>
> http://iptables-tutorial.frozentux.net/iptables-tutorial.html#DNATTARGET
>
> Ciao for now,
>
> -Martin
>
> --
> Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-21 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-21 14:43 [LARTC] iptables port forward Tomas Bonnedahl
2003-05-21 14:51 ` Martin A. Brown
2003-05-21 14:57 ` Tomas Bonnedahl
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.