Help with multi-node routing!

This is a discussion on Help with multi-node routing! within the Linux Networking forums, part of the Linux Forums category; Hello, I need a quick solution... I am an iptables novice, but I have managed to get a rather complex ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2004
CoogarXR
 
Posts: n/a
Default Help with multi-node routing!

Hello,

I need a quick solution... I am an iptables novice, but I have managed to get
a rather complex network setup with one small problem. Here is a diagram of my
setup (I know 99.x and 98.x are not proper internal IPs, I will get to that
later):

Http://208.45.203.98/fiber.jpg

The Yellow lines are fiber optics that seperate our 3 facilities. The idea
behind this network is to be able to have control over the VoIP, internet and
LAN/WAN traffic seperately, and ultimately implement some QOS. I am working on
just basic routing for now. Now for my problem. My email server is at the
corporate office at 10.10.10.2


Here is what I have in rc.local on the plant box (there is nothing in the
rc.local on the corporate box):
>>>>>>

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
iptables -A PREROUTING -t nat -p tcp -d 24.154.84.34 --dport 25 -j DNAT --to
10.10.10.2:25
iptables -A PREROUTING -t nat -p tcp -d 24.154.84.34 --dport 110 -j DNAT --to
10.10.10.2:110
>>>>>>


Here are my routes on the plant box
>>>>>

[root@Cable root]# ip route show
99.0.0.0/24 dev eth0 scope link
172.10.0.0/24 via 192.168.20.10 dev eth2
24.154.84.0/24 dev eth1 scope link
98.0.0.0/24 via 192.168.20.10 dev eth2
192.168.20.0/24 dev eth2 scope link
172.30.0.0/24 via 192.168.20.10 dev eth2
172.20.0.0/24 dev eth3 scope link
10.10.10.0/24 via 192.168.20.10 dev eth2
192.168.10.0/24 via 192.168.20.10 dev eth2
127.0.0.0/8 dev lo scope link
default via 24.154.84.1 dev eth1
default via 24.154.84.1 dev eth1 src 24.154.84.40 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.39 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.38 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.37 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.36 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.35 metric 1
default via 24.154.84.1 dev eth1 src 24.154.84.34 metric 1
>>>>>


here are my routes on the Corporate box:
>>>>>

[root@localhost root]# ip route show
99.0.0.0/24 via 192.168.20.20 dev eth2
172.10.0.0/24 dev eth3 scope link
98.0.0.0/24 via 192.168.10.20 dev eth1
192.168.20.0/24 dev eth2 scope link
172.30.0.0/24 via 192.168.10.20 dev eth1
172.20.0.0/24 via 192.168.20.20 dev eth2
10.10.10.0/24 dev eth0 scope link
192.168.10.0/24 dev eth1 scope link
127.0.0.0/8 dev lo scope link
default via 192.168.20.20 dev eth2
>>>>>


So my external email server's address is 24.154.84.34 and it has to be routed
like this:
24.154.84.34 -> 192.168.20.20 -> 192.168.20.10 -> 10.10.10.254 -> 10.10.10.2

The problem is, people sending mail from the plant location show up as
192.168.20.20 which is not on the allowed relay list, because outside traffic
shows up as that IP too (so if I enable it, it makes me an open relay). How do
I get the plant PCs to show up as their own IP and not 192.168.20.20? I would
also like to have external incoming mail to have it's ip listed, and not
192.168.20.20 I am pretty sure its all in the masquerading lines in my
rc.local, but being a novice, I don't know of another way to do it. This is
probably stupid and easy for all you pro's, but can somebody lend me a hand
here?


CoogarXR
"The Linux Virgin"

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:46 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0