[LARTC] SNAT or DNAT or what?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux