Skip to contentSkip to conversation

NAT problem

DISCUSSION saravanan sakthi 2 participants 2 messages Oct 21, 2002

lore
Share & tools
lore
#0 lore raw
  Here is my sinario...
        |             
     ___v__________________
    | eth0: 192.168.1.3/24 |
    |                      |
    |     Linux Box        |
    |                      |
    | eth1: 10.1.1.1/16    |
    `---|------------------'
        |
    ____v________________________________________
   /                                             \
  |   10.1.0.0 network                            \
  |                                                \
  |       ____________         __________           |
  |      /            \       /           \         |
  |     | 10.1.11.0/16 |     | 10.1.9.0/16 |        |
  |     |   network    |     |   network   |        |
  |      \____________/       \___________/         |
  |                                                 |
  |       _____________________________             |
  |      /                             \            |
  |     | 10.1.12.0 (My Network)        \           |
  |     |         |                      \          |
  |     |         |                       \         |
  |     |      ___v________________        |        |
  |     |     | eth0: 10.1.12.1/16 |       |       /
  |     |     |                    |       |      /
  |     |     |    Linux Box       |       |     /
  |     |     |                    |      /     /
  |     |     | eth1: 10.0.0.1/8   |     /     /
  |     |     `---|----------------'    /     /
  |     |         |                    /     /
  |     |        _v________           /     /
  |     |       /          \         /     /
  |     |      | 10.0.0.0/8 |       /     /
  |     |      | network    |      /     /
  |      \      \__________/      /     /
   \      \                      /     /
    \      \____________________/     /
     \                               /
      \_____________________________/

Here

* The Linux box at the beginning acts as a gateway
and DNS forwarder
for the entire network (installed with
rc.firewall-2.4).

* My network is 10.1.12.0, I have implemented my
Linux box as a
router for my network (installed with
rc.firewall-2.4).also acts
as DNS forwarder (forwards requests to 10.1.1.1).

* I have a subnet inside (10.0.0.0).my Linux box
acts as a gateway
for these computers.

What I want is.....

Connect a computer from 10.0.0.0 network to connect
computers at
10.1.0.0 network.

Please tell me what are the rules should be added to rc.firewall-2.4
file to accomplish this.

Thanks for time

Regards,

Saravanan.V

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

#1 lore raw
Quoted 1 line · saravanan sakthi

Here is my sinario...

[ Large Ascii-art diagram snipped for brevity ]

This network setup simply will not work sensibly.

You have the following networks connected to each other:

10.1.1.0/16
10.1.11.0/16
10.1.9.0/16
10.1.12.0/16
10.0.0.0/8

There is no sane way you can get the network addresses, all with a /16
netmask, to communicate. Every one of the /16 networks has 10.1.0.0 as its
network address, and 10.1.255.255 as its broadcast address. Yoou routers
simply will not know what to do.

Also, the final network you listed, 10.0.0.0/8, covers all the other networks combined - I don't know whether to say this is just as bad as the first four, or even worse:-)

To summarise - before you start playing around with netfilter and trying to control what *isn't* allowed through your routers (after all, that's what netfilter is - a packet filter which doesn't allow some packets through which otherwise would get routed), please create a network setup where you have differen subnets on each segment, and it is possible to create some routing tables which will work.

As a first suggestion, changing all your netmasks to /24 would appear to do the trick.

Antony.

Signature · 5 lines
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.