From: Stewart Thompson Subject: RE: port forward using iptables not happening Date: Fri, 05 Jul 2002 00:48:00 -0700 Sender: netfilter-admin@lists.samba.org Message-ID: References: <001e01c223ef$7bdc0d50$0805010a@gecs.net> Reply-To: stewart.thompson@shaw.ca Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary_(ID_S9s4USvJPnDSktWk4Y/AlQ)" Return-path: In-Reply-To: <001e01c223ef$7bdc0d50$0805010a@gecs.net> Errors-To: netfilter-admin@lists.samba.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.samba.org This is a multi-part message in MIME format. --Boundary_(ID_S9s4USvJPnDSktWk4Y/AlQ) Content-type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Deepali: Questions: 1) Is packet forwarding enabled networking? 2) Is this your full rule set? 3) What is your forward policy/rules? DNAT/SNAT is not enough if you don=92t forward it. Do a iptables =96L =96v, and post it to the group. Also your full rule set. Stu=85=85=85. -----Original Message----- From: netfilter-admin@lists.samba.org [mailto:netfilter-admin@lists.samba.org]On Behalf Of deepali Sent: July 4, 2002 11:45 PM To: netfilter@lists.samba.org Subject: port forward using iptables not happening Dear Support My setup is ..I have one linux box having eth0(valid ip202.140.152.33) and eth1(invalid ip-local lan192.168.220.250) .I have one more machine in my Local Lan (192.168.220.90) which is a mail server in my local LAN.Now I want to 1.enable port forwarding ie any request comming on 202.140.152.33 port 285 should get forwarded to 192.168.220.90 port 25 my mail server. 2.Also any request comming from my lan ie 192.168.220.0/24 to invalid ip of linux box ie 192.168.220.90 285 should also forwarded to my Mail server in lan ie 192.168.220.30 port 25. My first synario is also not working. my rules are iptables -t nat -A PREROUTING -i eth0 -p tcp -d 202.140.136.90 --dport 285 -j DNAT 182.168.220.90:25 iptables -t nat -A POSTROUTING -o eth0 -j MASQURADE iptables -t nat -A POSTROUTING -s 192.168.220.0/24 -j MASQURADE Pls help Thanks and Regards Deepali --Boundary_(ID_S9s4USvJPnDSktWk4Y/AlQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT

Hi Deepali:

 

            Questions:

 

            1) Is packet forwarding enabled networking?

            2) Is this your full rule set?

            3) What is your forward policy/rules? DNAT/SNAT is not enough if you don’t forward it.

           

 

Do a iptables –L –v, and post it to the group. Also your full rule set.

 

Stu……….

 

 

-----Original Message-----
From: netfilter-admin@lists.samba.org [mailto:netfilter-admin@lists.samba.org]On Behalf Of deepali
Sent: July 4, 2002 11:45 PM
To: netfilter@lists.samba.org
Subject: port forward using iptables not happening

 

Dear Support

My setup is ..I have one linux box having eth0(valid ip202.140.152.33) and eth1(invalid ip-local lan192.168.220.250) .I have one more machine in my Local Lan (192.168.220.90) which is a mail server in my local LAN.Now I want to

1.enable port forwarding ie any request comming on 202.140.152.33 port 285 should get forwarded to 192.168.220.90 port 25 my mail server.

 

2.Also any request comming from my lan ie 192.168.220.0/24 to invalid ip of linux box ie 192.168.220.90 285 should also forwarded to my Mail server in lan ie 192.168.220.30 port 25.

 

My first synario is also not working.

 

my rules are

 

iptables -t nat -A PREROUTING -i eth0 -p tcp -d 202.140.136.90 --dport 285 -j DNAT 182.168.220.90:25

 

iptables -t nat -A POSTROUTING  -o eth0 -j MASQURADE

iptables -t nat -A POSTROUTING -s 192.168.220.0/24 -j MASQURADE

 

Pls help

 

 

Thanks and Regards

Deepali

 

--Boundary_(ID_S9s4USvJPnDSktWk4Y/AlQ)--