Re: Redirect ports on localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recently I was trying to redirect traffic on the  localhost though for
different reasons. I finally came to the conclusion that localhost
packets aren't prerouted. Can anyone confirm this?

al

On Wed, 2004-03-24 at 15:14, Alexander Samad wrote:
> On Tue, Mar 23, 2004 at 01:10:21PM -0700, Ben Yerushalmi wrote:
> > Hi,
> > 
> > I'm trying to redirect traffic on my DNS server. I have bind listening 
> > on port 5300 (UDP) instead of 53. I've got it working from the internal 
> > network but seem to have problem on redirecting localhost traffic. I've 
> > tried changing both PREROUTING and OUTPUT chains in the nat table but it 
> > doesn't seem to help.
> > 
> > iptables -A PREROUTING -t nat -p udp -i lo --dport domain -j REDIRECT 
> > --to-ports 5300
> > 
> > and
> > 
> > iptables -A OUTPUT -t nat -p udp -d localhost  --dport domain -j 
> > REDIRECT --to-ports 5300
> might be of target but will the destination be localhost or the real ip
> address ?
> 
> A
> 
> > 
> > 
> > Anyone have luck doing this? What am I missing?
> > 
> > Thanks,
> > Ben
> > 
> > 
> > 
> > 



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux