All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uwe Eisner <Uwe.Eisner@globit.com>
To: netfilter@lists.samba.org
Subject: SNAT does not work
Date: Thu, 06 Jun 2002 15:27:03 +0200	[thread overview]
Message-ID: <3CFF6327.5020306@globit.com> (raw)

Hi @ all,

I'm using a internal ip-range, wherefor I need NAT to connecting to the 
internet..

My problem is, that this rule does not work. When I start a Perl-code at 
the www, witch shows me my ip-address, it showes me the IP-address of 
the external interface of the router/firewall. I can not find the 
problem. If I set no POSTROUTING rule, it is the same game...

Is it possible, that NAT is not activeted at my kernel. How can I test it?

Hier a snippet of my roules:

# Delete all Rules (not the standard policy)
iptables -F

# --> SET ALL INPUT FLAGS <--
iptables -P INPUT DROP                                          # DROP 
all, if no rule matches
iptables -A INPUT -i eth0 -j ACCEPT                             # Every 
request, from the internal interface is allowed
iptables -A INPUT -s 141.12.0.0/16 -j ACCEPT                    # Every 
request, from the GMD-LAN is allowed

# --> SET ALL FORWARD FLAGS <--
iptables -P FORWARD DROP                                        # DROP 
all, if no rule matches
iptables -A FORWARD -s 192.168.0.0/16 -j ACCEPT
iptables -A FORWARD -d 192.168.0.0/16 -m state --state 
ESTABLISHED,RELATED -j ACCEPT

# --> SET ALL OUTPUT FLAGS <--
iptables -P OUTPUT ACCEPT                                       # ACCEPT 
all, if no rule matches

# --> MASQUARDING <--
iptables -A POSTROUTING -t nat -o eth1 -j SNAT --to-source 141.12.218.99

# 141.12.218.3 => 192.168.1.3 ==> MAIL.globit.com (DA-WEB01)
# ========================================================================
iptables -A PREROUTING -t nat -d 141.12.218.3 -j DNAT --to-destination 
192.168.1.3
iptables -A FORWARD -p tcp -d 192.168.1.3/32 --dport 25 -j ACCEPT       
## SMTP Port
iptables -A FORWARD -p tcp -d 192.168.1.3/32 --dport 110 -j ACCEPT      
## POP3 Port
iptables -A FORWARD -p tcp -d 192.168.1.3/32 --dport 143 -j ACCEPT      
## IMAP Port


Hope sameone can help me.

Thx and best regards
Uwe Eisner



             reply	other threads:[~2002-06-06 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 13:27 Uwe Eisner [this message]
2002-06-06 13:40 ` SNAT does not work Antony Stone
2002-06-06 13:57 ` Antony Stone
2002-06-06 14:45   ` Uwe Eisner
2002-06-06 14:55     ` Antony Stone
2002-06-07 10:50       ` Uwe Eisner

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=3CFF6327.5020306@globit.com \
    --to=uwe.eisner@globit.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 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.