Hi, I believe I've located a problem when using advanced NAT and ticking the 'not' destination option!
I've manage to reproduce the bug on my test machine so at least I can make this happen at will.
My configuration is:
- Compaq Deskpro EN SFF PII 350MHz
- 128MB RAM
- 64MB CF card in a CF to IDE adapter
- On board Intel 82558 ethernet adapter as LAN (fxp0)
- 3com 3c905C ethernet adapter (I've also tried a 3c905B) as WAN (xl0)
I'm starting with a bare installation of 1.3b15, changing the LAN address range to 192.168.235.0/24 with a LAN address 192.168.235.1, changing the LAN DHCP range to match the new address range and then changing the WAN address to a spare IP address I have in a /29 address range.
With advanced NAT disabled performance is absolutely fine and as expected.
Enabling advanced outbound NAT and adding the following rule (which is exactly the same as advanced NAT being disabled) results in expected performance:
Interface Source Destination Target
WAN 192.168.235.0/24 * *ipnat -lv displays:
List of active MAP/Redirect filters:
map xl0 192.168.235.0/24 -> 0.0.0.0/32 proxy port ftp ftp/tcp
map xl0 192.168.235.0/24 -> 0.0.0.0/32 portmap tcp/udp 1024:64535
map xl0 192.168.235.0/24 -> 0.0.0.0/32
map xl0 from x.y.z.3/32 to any port = 53 -> 0.0.0.0/32 tcp/udp
However, adding the following rule shows the problem (which shouldn't even trigger for this test):
Interface Source Destination Target
WAN 192.168.235.0/24 ! 192.168.0.0/24 *When the above rule is in effect I'm seeing packets being dropped and the client doing a retransmit and eventually the request is completed but not until after a substantial delay (about 3 seconds!).
ipnat -lv displays:
List of active MAP/Redirect filters:
map xl0 from 192.168.235.0/24 ! to 192.168.0.0/24 -> 0.0.0.0/32 proxy port ftp ftp/tcp
map xl0 from 192.168.235.0/24 ! to 192.168.0.0/24 -> 0.0.0.0/32 portmap tcp/udp 1024:64535
map xl0 from 192.168.235.0/24 ! to 192.168.0.0/24 -> 0.0.0.0/32
map xl0 from x.y.z.3/32 to any port = 53 -> 0.0.0.0/32 tcp/udp
I'm testing an HTTP connection to my ADSL router which requests authentication immediately without the inverted NAT rule but take approximately 3 seconds with the inversion in place!.
This is repeatable and in fact I've tried it several times just to make sure I'm changing the bare minimum options to hopefully make the problem easier to diagnose!
I've searched for FreeBSD 6.3 bugs related to this issue but not discovered anything! I've checked out the FreeBSD man page for ipnat and it doesn't actually list being able to invert the destination as an option!
Is anyone else able to confirm this bug?