From: Dmitry Ananjev <altex@crazy.ru>
To: netfilter@lists.netfilter.org
Subject: Iptables + traceroute + NAT = invalid packet? :-(
Date: Thu, 13 Jan 2005 23:20:36 +0400 [thread overview]
Message-ID: <41E6CA04.6090203@crazy.ru> (raw)
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
reply other threads:[~2005-01-13 19:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41E6CA04.6090203@crazy.ru \
--to=altex@crazy.ru \
--cc=netfilter@lists.netfilter.org \
/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