All of lore.kernel.org
 help / color / mirror / Atom feed
* Forwarding problem, :( port redirection!
@ 2003-02-24  8:12 louie miranda
  2003-02-24  8:25 ` Rasmus Bøg Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: louie miranda @ 2003-02-24  8:12 UTC (permalink / raw)
  To: netfilter

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-02-26 10:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-24  8:12 Forwarding problem, :( port redirection! louie miranda
2003-02-24  8:25 ` 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

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.