From: "Raul I. Becette" <raulbecette@unp.edu.ar>
To: netfilter@lists.netfilter.org
Subject: port forwarding partially working
Date: Wed, 16 Feb 2005 17:58:29 -0300 [thread overview]
Message-ID: <4213B3F5.1010508@unp.edu.ar> (raw)
Hello again
I am having trouble forwarding ports to internal servers.
There is a server in the LAN at $SERV_BIBL running on Windows NT4 and
the port forwarding lines
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 1024 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 1024 -j DNAT
--to $SERV_BIBL:110
works ok when I telnet $PUB_IF 1024. I got redirected to the POP server
with no problems.
The problem is when I try to forward port any other port (including
1024) to the same server on ports 25 or 21 (ftp access too).
The lines I added to my iptables scripts are the same as above changing
1024 to 1025 and 110 to the service port (25 or 21).
Mail server running is MERCUR SMTP Server (v4.02.07
FTP Server running is WarFTPd 1.81.01
When I telnet internally to the private IP on ports 25 and 21 I have no
problems and get the welcome message of the service.
The same thing happens with another internal server running on Mandrake
Linux
POP works ok but MTA and FTP services are not forwarded on the ports I added
Postfix Mail Server and ProFTPD 1.2.5rc1 Server
One last thing
I have a forwarding of port 25 on $PUB_IF to port 25 on my internal POP
server with the users accounts and it works ok.
Same with POP
Below are the lines I have on my script for this I want to do
# Abro el puerto de smtp para enviar los correos desde unpata hacia a La
Gran Bestia POP
$IPTABLES -A FORWARD -i $PUB_IF -s $LAN_SMTP -p tcp --dport 25 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 25 -j DNAT --to
$LAN_POP:25
# POP a cuentas unpata.edu.ar y unp.edu.ar
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 110 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 110 -j DNAT
--to $LAN_POP:110
-------------------------------------So far the forwarding works
OK------------------------------------------------------
-------------------------------------From here only forwarding to 110
works--------------------------------------------
# Cuentas biblioteca.unp.edu.ar
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 1024 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 1024 -j DNAT
--to $SERV_BIBL:110
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 1025 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 1025 -j DNAT
--to $SERV_BIBL:25
# Cuentas ing.unp.edu.ar
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 1030 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 1030 -j DNAT
--to $SERV_ING:110
$IPTABLES -A FORWARD -i $PUB_IF -p tcp --dport 1031 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -i $PUB_IF -p tcp --dport 1031 -j DNAT
--to $SERV_ING:25
If you need more info just ask
Any help would be greatly appreciated
Thanks in advance
-----------------------------------------------------------------
Raul I. Becette
E-mail: raulbecette@unp.edu.ar
REPAC, Red Patagonica de Comunicaciones
Univ. Nac. de la Patagonia San Juan Bosco
Ciudad Universitaria - Km.4.
9000 - Comodoro Rivadavia - Chubut
Tel/Fax : (0297) - 4550073
------------------------------------------------------------------
next reply other threads:[~2005-02-16 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 20:58 Raul I. Becette [this message]
2005-02-16 21:17 ` port forwarding partially working Cedric Blancher
[not found] ` <4214B68A.7000301@unp.edu.ar>
2005-02-17 15:45 ` remap local addresses Remus
2005-02-17 16:07 ` Jason Opperisano
2005-02-17 16:14 ` Remus
2005-02-18 13:52 ` port forwarding partially working (SOLVED) Raul I. Becette
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=4213B3F5.1010508@unp.edu.ar \
--to=raulbecette@unp.edu.ar \
--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.