All of lore.kernel.org
 help / color / mirror / Atom feed
* Iptables + traceroute + NAT = invalid packet? :-(
@ 2005-01-13 19:20 Dmitry Ananjev
  0 siblings, 0 replies; only message in thread
From: Dmitry Ananjev @ 2005-01-13 19:20 UTC (permalink / raw)
  To: netfilter

Hello!

I have a problem with the connection tracking state extension.
I want to allow traceroute from my local network, so I configured my 
firewall to accept outgoing packets from my network.
I also accept established, related pachets and log&drop invalid packets:

iptables -A INPUT -m state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state INVALID -j LOG
iptables -A INPUT -m state INVALID -j DROP
iptables -A INPUT -i <LAN_IFACE> -j ACCEPT

iptables -A OUTPUT -m state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state INVALID -j LOG
iptables -A OUTPUT -m state INVALID -j DROP

iptables -A FORWARD -m state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state INVALID -j LOG
iptables -A FORWARD -m state INVALID -j DROP
iptables -A RORWARD -i <LAN_IFACE> -j ACCEPT

iptables -A POSTROUTING -o <INET_IFACE> -j SNAT --to-source <INET_IP>

However, at this time a traceroute from my local network to an external 
host looks like that:

---
Tracing route to ya.ru [213.180.193.123]
over a maximum of 30 hops:

  1     *        *        *     Request timed out.
  2    22 ms    23 ms    31 ms  213.156.200.xxx
  3    31 ms    21 ms    23 ms  213.156.195.xxx
  4    25 ms    50 ms    25 ms  e12.bcn1.xxx.xxx [213.156.192.xxx]
etc.
---

cat /var/log/messages
-------------
Jan 12 14:30:02 serv kernel: INVALID output: IN= OUT=eth0 
SRC=192.168.2.1 DST=192.168.2.10 LEN=120 TOS=0x00 PREC=0xC0 TTL=64 
ID=54714 PROTO=ICMP TYPE=11 CODE=0 [SRC=192.168.2.10 DST=213.180.193.123 
LEN=92 TOS=0x00 PREC=0x00 TTL=1 ID=26615 PROTO=ICMP TYPE=8 CODE=0 ID=512 
SEQ=32768 ]
-------------

So why does the time-exceeded answer have the state 
INVALID, though it should be RELATED as far as i can see it?
Am I doing something wrong or is it even an iptables bug?

Thank you!
WBR, Dmitry Ananjev
altex@crazy.ru




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-13 19:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-13 19:20 Iptables + traceroute + NAT = invalid packet? :-( Dmitry Ananjev

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.