Why would certain packets not reach nat PREROUTING chain?
Sandro Dentella Wrote:
Quoted 6 lines
Quoted 4 lines
I'm troubeshooting an issue of accessing a VPN through NAT. Right now the problem can be reduced to the following question:
Under what conditions would inbound packets not be routing through the nat PREROUTING chain?That's a problem that puzzles me too. Do you have fancy routing tables? (several different tables setup w/ iproute2).
Nope. At least for the purposes of this experiment, this is the only thing I'm trying to do. The entire task of iptables is SNATting outbound packet from the LAN, and then attempting to DNAT inbound packets on udp port 500 to a specific machine with the LAN. The outbound SNAT works fine; but the inbound packets don't ever reach the nat PREROUTING chain.
Quoted 3 lines
I also have a setup in which icmp packets will not get to PREROUTING. My understanding is that the kernel does not understand they are destined for that box: could that be your situation?
I don't think that's related, although I admit I don't have a thorough understanding of the issue... why would icmp packets matter when the issue is inbound UDP 500 packets that are showing up in tcpdump? Wouldn't showing up in tcpdump indicate that the kernel understands the packet is destined for that box?
Signature · 2 lines
Adam Rosi-Kessel http://adam.rosi-kessel.org
Quoted 7 lines
Quoted 3 lines
I also have a setup in which icmp packets will not get to PREROUTING. My understanding is that the kernel does not understand they are destined for that box: could that be your situation?
I don't think that's related, although I admit I don't have a thorough understanding of the issue... why would icmp packets matter when the issue is inbound UDP 500 packets that are showing up in tcpdump? Wouldn't
I'm not saying they are related. I just see that in both cases we have packets that arrive (tcpdump shows them) but are not correctly understood by the kernel as being destined for the box.
Quoted 2 lines
showing up in tcpdump indicate that the kernel understands the packet is destined for that box?
I don't think so. A packet that is to be forwareded is not "destined for the box". In general my understanding is that tcpdump reads everything that passes on the wire, as it comes before any routing decision. It sees also packets that are not destined for the box.
What I would like to understand is why a packet that tcpdump show as destined for the box in not understood as such.
I have been asking this since a couple of weeks on 3 different lists (netfilter, lartc, netdev), but didn't get a single answer...
sandro
Signature · 3 lines
Sandro Dentella *:-) e-mail: [email protected] http://www.tksql.org TkSQL Home page - My GPL work