Linux Netfilter discussions
 help / color / mirror / Atom feed
From: SBlaze <dagent.geo@yahoo.com>
To: Rohit Kumar Mehta <rohitm@engr.uconn.edu>, netfilter@lists.netfilter.org
Subject: Re: simple port forwarding question
Date: Mon, 3 Nov 2003 06:07:23 -0800 (PST)	[thread overview]
Message-ID: <20031103140723.2238.qmail@web40206.mail.yahoo.com> (raw)
In-Reply-To: <3FA65F1D.20205@engr.uconn.edu>


--- Rohit Kumar Mehta <rohitm@engr.uconn.edu> wrote:
> 
> Hi guys, I was wondering if someone could help me out here.  I am fairly 
> well confused after trying to muddle through
> this tutorial:
> http://iptables-tutorial.frozentux.net/iptables-tutorial.html
> 
> I think what I want to do should be easy.  Perhaps someone could help.
> 
> We are trying to trick the systems into believing that the Kerberos 5 
> server is on IP#2 (let's call it 192.168.28.3)
> but it is in fact on IP#1 (192.168.28.2).
> 
> Maybe my attempted iptables commands will make it blatantly obvious what 
> I am trying to do:
> 
> iptables -t nat -A PREROUTING --dst 192.168.28.3 -p tcp --dport 88 -j 
> DNAT --to 192.168.28.2
> iptables -t nat -A PREROUTING --dst 192.168.28.3 -p udp --dport 88 -j 
> DNAT --to 192.168.28.2
> 
> iptables -t nat -A POSTROUTING -p udp --dst 192.168.28.2 --dport 88 -j 
> SNAT --to-source 192.168.28.3
> iptables -t nat -A POSTROUTING -p tcp --dst 192.168.28.2 --dport 88 -j 
> SNAT --to-source 192.168.28.3
> 
> iptables -t nat -A OUTPUT --dst 192.168.28.3 -p tcp --dport 88 -j DNAT 
> --to-destination 192.168.28.2
> iptables -t nat -A OUTPUT --dst 192.168.28.3 -p udp --dport 88 -j DNAT 
> --to-destination 192.168.28.2
> 
> 
> Basically we want it so that if I do a "telnet 192.168.28.3 88", I get a 
> connection to "192.168.28.2:88"
> This works - when I initiate the connection from 192.168.28.3, but from 
> any other machine on the network
> it does not work.
> 
> Am I doing something wrong or forgetting a key step?  Thanks!
> 
> Rohit
> 
> 

I think you left out one important bit of information here. Are these two ips
on the same box? ( ie .1 on eth0 and .3 eth1 ) If they are I think it would
mean all the world of difference for your ruleset. you might be using the NAT
table when FOWARD lines in your filter table would sufice...

just a guess...

SBlaze

=====
In the absence of order there will be chaos.

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/


  parent reply	other threads:[~2003-11-03 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 13:58 simple port forwarding question Rohit Kumar Mehta
2003-11-03 11:57 ` Herman
2003-11-03 14:07 ` SBlaze [this message]
2003-11-03 14:12   ` Rohit Kumar Mehta
  -- strict thread matches above, loose matches on Subject: below --
2003-11-03 18:04 Han, Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031103140723.2238.qmail@web40206.mail.yahoo.com \
    --to=dagent.geo@yahoo.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=rohitm@engr.uconn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox