Mailinglist Archive: opensuse-security (520 mails)

< Previous Next >
RE: [suse-security] Port-forwarding
  • From: "Martin Koenig" <lists@xxxxxxxxxxx>
  • Date: Tue, 16 Jul 2002 21:39:25 +0200
  • Message-id: <JKEJKJNKJLAHFPEILGJHOEPPCAAA.lists@xxxxxxxxxxx>
Hi Anonymous,

> What is the best way to forward TCP and UDP ports from
> one computer to
> another?

Assuming you use NAT and 2.4 kernel:

iptables -A PREROUTING -t nat -p [PROTO] --dport [PORT] -i [I_IF] -j
DNAT --to [DEST]

[PROTO]: tcp / udp
[PORT]: Port on public IP, the one you wish to forward
[I_IF]: incoming (public) interface ( e.g. ppp0 )
[DEST]: destination ip:destination port

// Martin Koenig

PS: Why not use your real Name?
PPS: Now what part of your question exactly was security-related?


< Previous Next >
Follow Ups
References