Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "louie miranda" <lmiranda@chikka.com>
To: netfilter@lists.samba.org
Subject: Forwarding problem, :( port redirection!
Date: Mon, 24 Feb 2003 16:12:51 +0800	[thread overview]
Message-ID: <045a01c2dbdc$8964ae00$0b00000a@nocpc3> (raw)

Im trying just to forward simple ftp, 21 request into my internal machine.
Im typing this but it does not work..

any ideas?


iptables -t nat -A PREROUTING -i eth0 -p tcp -d 10.0.0.11 --dport 21 -j
DNAT --to 203.190.72.108:21
iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 203.190.72.108 --dport 21 -j
ACCEPT


eth0: Internet
eth1: LAN


Doc: http://www.knowplace.org/netfilter/syntax.html#conf6
================================
Destination NAT the packets (changes the destination IP address in the IP
header and port number in the TCP/UDP header)
    iptables -t nat -A PREROUTING -i eth0 -p protocol -d
ip_address_of_eth0 --dport original_port_number -j DNAT --to
destination_ip_address:destination_port_number
Forward the natted packets (allow the natted packet to be forwarded)
    iptables -A FORWARD -i eth0 -o eth1 -p protocol -d
destination_ip_address --dport destination_port_number -j ACCEPT
================================









--
thanks,
louie miranda




             reply	other threads:[~2003-02-24  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24  8:12 louie miranda [this message]
2003-02-24  8:25 ` Forwarding problem, :( port redirection! Rasmus Bøg Hansen
2003-02-24  8:32   ` louie miranda
2003-02-24  8:57     ` Rasmus Bøg Hansen
2003-02-24 10:21     ` Rob Sterenborg
2003-02-24 13:23     ` John Davey
2003-02-26 10:02       ` louie miranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='045a01c2dbdc$8964ae00$0b00000a@nocpc3' \
    --to=lmiranda@chikka.com \
    --cc=netfilter@lists.samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox