All of lore.kernel.org
 help / color / mirror / Atom feed
* problem with DNS server behind nat/packet filter
@ 2003-05-09 11:45 enjoy.the.silence
  2003-05-09 12:06 ` Ray Leach
  0 siblings, 1 reply; 4+ messages in thread
From: enjoy.the.silence @ 2003-05-09 11:45 UTC (permalink / raw)
  To: netfilter

hi,
i've been an user of netfilter/iptables for a short time, and it's always 
worked great for me, doing NAT and packet filtering exactly as it should 
(thanx a lot to who wrote the NAT-HOWTO although :D). anyway, i'm 
experiencing some strange behaviour: 

i have a DNATting rule as the following:
iptables -t nat -A POSTROUTING -o $EXTIF -j SNAT --to $EXTIP 

where EXTIF (ppp0 - yeah, dialup) and EXTIP (dynamically assigned but 
correctly detected) are properly set. recently i have set up a DNS server, 
and i wish it was accessible from the outside. i have used djbdns, and set 
it up correctly. actually the requests are received and processed, but the 
outgoing packets with the replies are blocked by my packet filter. i have 
the following log from dmesg:
IN= OUT=ppp0 SRC=10.0.6.5 DST=80.116.131.210 LEN=68 TOS=0x00 PREC=0x00 
TTL=64 ID=0 DF PROTO=UDP SPT=53 DPT=4538 LEN=48 

10.0.6.5 is the ip which djbdns is running on, and 80... is the ip who made 
the request. what is strange is that the packet was trying to go out with 
the internal ip! is this normal? it's been blocked because i have a rule:
iptables -A OUTPUT -o $EXTIF -s $UNIVERSE -d $INTNET -j drop-and-log-it 

shouldn't the packet's source address have already been changed at this 
time? what am i doing wrong? may it be because it's using the UDP protocol? 
my natting rule should work with all protocols though... 

help me!
thanks in advance!
Giorgio 



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: problem with DNS server behind nat/packet filter
@ 2003-05-09 13:48 enjoy.the.silence
  2003-05-09 15:04 ` Myles Uyema
  0 siblings, 1 reply; 4+ messages in thread
From: enjoy.the.silence @ 2003-05-09 13:48 UTC (permalink / raw)
  To: netfilter

i have the following roules in nat/PREROUTING: 

Chain PREROUTING (policy ACCEPT 89 packets, 5600 bytes)
pkts bytes target     prot opt in     out     source               
destination
   0     0 DNAT       tcp  --  any    any     anywhere             anywhere  
tcp dpt:webcache to:10.0.6.6:80
   0     0 DNAT       tcp  --  any    any     anywhere             anywhere  
tcp dpt:domain to:10.0.6.5
   3   193 DNAT       udp  --  any    any     anywhere             anywhere  
udp dpt:domain to:10.0.6.5 

i guess the third one might be the one that is doing the wrong job. 
although, it should only alter incoming packets on port 53 to my external ip 
so that they go to the internal box which is running the dns server. it 
should not touch the source address which will be become the destination 
address of the dns replies. or am i wrong? 

thank for now!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-09 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-09 11:45 problem with DNS server behind nat/packet filter enjoy.the.silence
2003-05-09 12:06 ` Ray Leach
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09 13:48 enjoy.the.silence
2003-05-09 15:04 ` Myles Uyema

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.