All of lore.kernel.org
 help / color / mirror / Atom feed
From: <oarojo@intermediacorp.com>
To: netfilter@lists.netfilter.org
Subject: portforwarding-HOWTO
Date: Mon, 6 Jan 2003 14:50:37 +0800 (PHT)	[thread overview]
Message-ID: <2132.192.168.0.1.1041835837.squirrel@mail.intermediacorp.com> (raw)

Hello people!!!

I have set-up a linux box firewall with two ethernet cards; eth0 facing the
internet and eth1 facing the internal network. Inside my network is my mail
server with an IP of 192.168.0.5. Now since my ISP had only given me one
valid IP address for my network, I wish to do port-forwarding for ports 25
and 110. I did something like:

# iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport 25
-j DNAT --to 192.168.0.5:25

# iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport
110 -j DNAT --to 192.168.0.5:110

# iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.5 --dport 25 -j ACCEPT
# iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.5 --dport 110 -j ACCEPT

# iptables-save > /etc/sysconfig/iptables


When i used nmap to determine if ports 25 and 110 are open, it says:

25/tcp     filtered    smtp
110/tcp    filtered    pop-3

and when i try telnetting its valid ip

#telnet xxx.xxx.xxx.xxx 25


it says "trying...." and can't connect at all...

How's this? Did I missed something here? Please Help!!!


Oliver






             reply	other threads:[~2003-01-06  6:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-06  6:50 oarojo [this message]
2003-01-07 22:06 ` portforwarding-HOWTO Linux
2003-01-08  3:59 ` portforwarding-HOWTO Joel Newkirk

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=2132.192.168.0.1.1041835837.squirrel@mail.intermediacorp.com \
    --to=oarojo@intermediacorp.com \
    --cc=netfilter@lists.netfilter.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 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.