From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rimas" Subject: Two ISP and NAT Date: Mon, 30 Sep 2002 19:26:43 +0100 Sender: netfilter-admin@lists.netfilter.org Message-ID: <007101c268ae$eec3e910$6e69690a@rimas> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006E_01C268B7.4F061DE0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_006E_01C268B7.4F061DE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi folks, I have 2 ISP Inet connections. 1 Inet I (eth0) use have used for everything (SMTP server, MASQ for = local network) I got the 2 INET (eth1) and made some changes: They both have MASQ: iptables -t nat -A POSTROUTING -o $EXTERNAL_INTERFACE_2 -j = MASQUERADE (2 Inet) iptables -t nat -A POSTROUTING -o $EXTERNAL_INTERFACE_1 -j = MASQUERADE (1 Inet) I changed default route to eth1 and put some additional route:=20 ip route rep default via ext_ip2 dev eth1 ip route add 1.2.3.4 via ext_ip1 (eth0) And now I'm having a problem with my email server (Lotus Notes on = Linux). It can send emails via SMTP but cannot use encrypted Lotus connection = and receive emails as well. iptables -t nat -A PREROUTING -i $EXTERNAL_INTERFACE_1 -p tcp -d = $EXTERNALIP_1 --dport 25 \ -j DNAT --to-destination 1.2.3.196:25 # Lotus Notes Encrypted connection (tcp 1352) port forward from eth0 to = internal ip 10.105.105.196 =20 iptables -t nat -A PREROUTING -i $EXTERNAL_INTERFACE_1 -p tcp -d = $EXTERNALIP_1 --dport 1352 \ -j DNAT --to-destination = 1.2.3.196:1352 And how to route with ip route command that email server have to use not = the default route (eth1) but eth0. What I need to configure more to get working back my email server? Thank you in advance Rimas ------=_NextPart_000_006E_01C268B7.4F061DE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi folks,
 
I have 2 ISP Inet = connections.
 
1 Inet I (eth0) use have used for = everything (SMTP=20 server, MASQ for local network)
I got the 2 INET (eth1)  and made = some=20 changes:
 
They both have MASQ:
    iptables -t nat -A = POSTROUTING=20 -o $EXTERNAL_INTERFACE_2 -j MASQUERADE (2 Inet)
    = iptables=20 -t nat -A POSTROUTING -o $EXTERNAL_INTERFACE_1 -j MASQUERADE (1=20 Inet)
 
I changed default route to eth1=20 and put some additional  = route:=20
ip route rep default via ext_ip2 dev = eth1
ip=20 route add  1.2.3.4 via ext_ip1 (eth0)
 
And now I'm having  a problem = with my=20 email server (Lotus Notes on Linux).
It can send emails via SMTP but cannot = use=20 encrypted Lotus connection and receive emails as well.
 
 iptables -t nat -A PREROUTING -i=20 $EXTERNAL_INTERFACE_1 -p tcp -d $EXTERNALIP_1 --dport 25=20 \
           &n= bsp;           &nb= sp;         =20 -j DNAT --to-destination 1.2.3.196:25
 
# Lotus Notes Encrypted connection (tcp = 1352) port=20 forward from eth0 to internal ip 10.105.105.196 
 iptables = -t nat=20 -A PREROUTING -i $EXTERNAL_INTERFACE_1 -p tcp -d $EXTERNALIP_1 --dport = 1352=20 \
           &n= bsp;           &nb= sp;          =20 -j DNAT --to-destination 1.2.3.196:1352
 
And how to route with ip route command=20 that email server have to use not the default route = (eth1) but=20 eth0.
 
What I need to configure more to get = working back=20 my email server?
 
 
Thank you in advance
 
Rimas
 
------=_NextPart_000_006E_01C268B7.4F061DE0--