From: "Torsten Puls" <watchit@pumpum.de>
To: lartc@vger.kernel.org
Subject: [LARTC] SNAT or DNAT or what?
Date: Tue, 15 Apr 2003 14:43:40 +0000 [thread overview]
Message-ID: <marc-lartc-105041792824038@msgid-missing> (raw)
Hello,
I have a Debian-Woody-3.0 Router with 3 NIC's.
Kernelversion 2.4.18
+------------+ +-------------+
| | | |
|192.168.1.1 | | 192.168.2.1 |
| DSL-Router | | ISDN-Router |
+------------+ +-------------+
| |
| |
+---------+ +----------+
| |
| |
+----------------------------------+
| eth0 eth2 |
| Debian-Woody |
| eth1 |
+----------------------------------+
|
|
+----------------+
| 192.168.3.0/24 |
| localnet |
+----------------+
Mail-Traffic over ISDN-Router
WWW-Traffic over DSL-Router
But why?
### Here are my interfaces:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.2.20
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
# gateway 192.168.2.1
auto eth2
iface eth2 inet static
address 192.168.3.30
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
# gateway 192.168.3.1
Is this correct?
### my route:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
and now my firewall-script:
#!bin/bash
# firewall-script
echo 1 > /proc/sys/net/ipv4/ip_forward
?????????????????????????????????????????
iptables -t nat -A POSTROUTING -j SNAT --to 192.168.1.10
so can I surf and get mail, but over eth0
Have anyone an idea?
Kernelmodules are loaded.
Greetz Torsten
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2003-04-15 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-15 14:43 Torsten Puls [this message]
2003-04-15 15:05 ` [LARTC] SNAT or DNAT or what? Martin A. Brown
2003-04-15 17:48 ` N N Ashok
2003-04-15 18:10 ` Martin A. Brown
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=marc-lartc-105041792824038@msgid-missing \
--to=watchit@pumpum.de \
--cc=lartc@vger.kernel.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.