Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Juan Hernandez <hvjuan@kanux.com>
To: "Aldo S. Lagana" <alagana@discmail.com>
Cc: 'Lista de netfilter' <netfilter@lists.netfilter.org>
Subject: RE: port forwarding in a web server
Date: 26 Nov 2003 11:52:02 -0400	[thread overview]
Message-ID: <1069861922.6615.12.camel@webmail.aeropostal.com.ve> (raw)
In-Reply-To: <200311261527.hAQFRkAm029339@discmail.com>

Thank you all for your help but this was answered yesterday... if you'd
like, ill forward the mail in which it ended

Juan

On Wed, 2003-11-26 at 11:24, Aldo S. Lagana wrote:
> " it's just not forwarding anything"
> 
> Add FORWARD rules -d 192.168.0.1 -j ACCEPT
> 
> -----Original Message-----
> From: netfilter-admin@lists.netfilter.org
> [mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Juan Hernandez
> Sent: Monday, November 24, 2003 11:05 AM
> To: Lista de netfilter
> 
> Hi there...
> 
>    This may have been answered many times in this mailing list but I
> haven't found anything on the web about something that would make my
> server forward the way I want to, and what's ironic is that it seems
> simple. Here's my scenario: I have a static IP address routed (1.1.1.1)
> to one server using a 192.168.0.* address. Is a cisco router and
> everything works fine. This server has 192.168.0.1 as it's address and
> functions as a web server, everything works fine but, I have another
> server that works as our mail server that is using 192.168.0.2. I've
> been trying to redirect everything coming from port 25 to my mail server
> but it doesn't get any answer. These are the rules I've been using: 
> 
> echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> modprobe iptable_nat
> 
> #allow all outgoing traffic from the mail server 
> 
> iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --to 192.168.0.1
> 
> #dnat
> iptables -t nat -A PREROUTING -p tcp --dport 25 -i eth0 -j DNAT --to
> 192.168.0.1:25
> 
> The gateway on the mailserver is 192.168.0.1 which is the webserver that
> it's forwarding everything... and I have tried so many things that
> sometimes the webserver stops working...
> 
> Using that configuration, if I nmap the webserver it shows that tport 25
> is filtered but, if i telnet to taht port I wont get any response... and
> the mailserver is running perfectly, it's just not forwarding anything
> 
> Any suggestions would be appreciated...
> 
> Thanks a lot for your time
> 
> Juan
> 
> 
> 
> 
> 
> 



  reply	other threads:[~2003-11-26 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-24 16:05 port forwarding in a web server Juan Hernandez
2003-11-26 15:24 ` Aldo S. Lagana
2003-11-26 15:52   ` Juan Hernandez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-24 16:13 Juan Hernandez
2003-11-24 17:11 ` Rob Sterenborg
2003-11-24 17:47   ` Juan Hernandez
2003-11-24 17:56   ` Juan Hernandez
2003-11-24 17:20 ` Jeffrey Laramie

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=1069861922.6615.12.camel@webmail.aeropostal.com.ve \
    --to=hvjuan@kanux.com \
    --cc=alagana@discmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox