netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xt_RAWNAT target idea
@ 2008-01-13 16:08 Jan Engelhardt
  2008-01-13 16:09 ` [xt_RAWNAT 1/3] Make room in the hook priority list Jan Engelhardt
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Jan Engelhardt @ 2008-01-13 16:08 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List

Hi,


the following series implements xt_RAWNAT, a target to do network
address translation not depending on conntrack. I still have an issue
though, if you have an idea what could be wrong, please let me know.



Network scheme:
	vmware--(eth0) -> (rtl0)--ichi--(sis0) -> internet and 85.214.

16:47 ichi:../Coding/linux-2.6_nosov # tcpdump -lni rtl0 port 22 -Xs0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rtl0, link-type EN10MB (Ethernet), capture size 65535 bytes
16:47:29.767215 IP 192.168.222.24.38108 > 85.214.69.204.22: S 3962616798:3962616798(0) win 5840 <mss 1460,sackOK,timestamp 6565122 0,nop,wscale 2>
        0x0000:  4510 003c 96dc 4000 4006 696c c0a8 de18  E..<..@.@.il....
        0x0010:  55d6 45cc 94dc 0016 ec30 bbde 0000 0000  U.E......0......
        0x0020:  a002 16d0 94a3 0000 0204 05b4 0402 080a  ................
        0x0030:  0064 2d02 0000 0000 0103 0302            .d-.........


The odd part is that the packet is not recognized by connection tracking
on ichi. `conntrack -E` remains silent, and the packet does not hit the
nat table. Only in mangle it is visible:

# iptables -t mangle -A FORWARD -i rtl0 -j LOG --log-prefix "[fw/rtl0] "

[14168.102974] [fw/rtl0] IN=rtl0 OUT=sis0 SRC=192.168.222.24 DST=85.214.69.204
LEN=60 TOS=0x10 PREC=0x00 TTL=63 ID=64886 DF PROTO=TCP SPT=40337 DPT=22
WINDOW=5840 RES=0x00 SYN URGP=0 


Is the packet constructed wrong? What I used inside the VMware host was:

# iptables -t raw -A POSTROUTING -o eth0 -d 1.3.3.7 -j RAWDNAT --to
  85.214.69.204



thanks,
Jan

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

end of thread, other threads:[~2008-01-15  6:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-13 16:08 xt_RAWNAT target idea Jan Engelhardt
2008-01-13 16:09 ` [xt_RAWNAT 1/3] Make room in the hook priority list Jan Engelhardt
2008-01-13 16:10 ` [xt_RAWNAT 2/3] Extend iptable_raw by POSTROUTING hook Jan Engelhardt
2008-01-13 16:10 ` [xt_RAWNAT 3/3] xt_RAWNAT code Jan Engelhardt
2008-01-13 16:25   ` Jan Engelhardt
2008-01-13 16:22 ` [xt_RAWNAT] iptables libxt_RAWNAT Jan Engelhardt
2008-01-14  6:04 ` xt_RAWNAT target idea Patrick McHardy
2008-01-14  9:45   ` Jan Engelhardt
2008-01-14  9:53     ` Patrick McHardy
2008-01-14 14:28       ` Jan Engelhardt
2008-01-14 14:39         ` Jozsef Kadlecsik
2008-01-14 22:43         ` Amos Jeffries
2008-01-14 15:20       ` Jan Engelhardt
2008-01-15  6:34         ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).