This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Strange Masquerading Issue

Hi.

Today I've got a call from a colleague.
From what he says - he can see in his firewall, the internal source address of some (not all) of the stations from my Lan network which connect to his servers.
Since my entire internal network doing Masquerading, I wonder how this could be.
As far as I know, only DNat transmit the source address.

Any Idea?
[:S]


This thread was automatically locked due to age.
  • Goldy, I've only noticed one problem with Strict TCP, but it was severe enough that it forced me to turn it off:
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/54/t/40764


    Hi Barry.
    Since it's been long time ago, could you please check if it still persist?


    OK, I just turned it on in 9.106; NS is working; will run tcpdump...

    Barry
  • Hi,

    Strict Mode does seem to be helping with the leaking packets.

    However, Strict Mode seems to drop all "ACK PSH FIN" packets, even from fresh connections (e.g. not already expired by iptables).

    This causes a LOT of traffic from the Android and iOS to be logged, for some reason.
    Refreshing my gmail on my Android immediately logs 3 dropped packets each time.

    Barry
  • Hi.
    See Sophos answer:

    "Its not actually a known issue, its been reported before, but the fault has always been with the network configuration when it has been further examined.
    I've checked your Utm and am confident that there are no settings on here that would route internal traffic directly through to your external WAN interface."

    Can any one confirm it?
  • Hi Goldy,
    as you can read in this thread 

    https://community.sophos.com/products/unified-threat-management/astaroorg/f/54/t/41243

    that's what they told me, too.

    They weren't really able to tell me what exactly should be wrong with my config. So they just closed the call. :-(

    We finaly have a new support contract with a different company for our sophos UTMs. I will ask them if they know anything about it or if there is really a config problem on my side.
  • Goldy,

    Can you check and see if the problem is similar to what is described here: Ubuntu Linux iptables firewall rules to prevent TCP package leakage. WWW.Smythies.com. What this guy describes is very similar to what BarryG & Xavier2 were noting in the other thread.

    Basically, Linux iptables recieves a TCP close sequence and kills the entry in the conntrack table approx 30sec later. After that window of time has passed, a packet is recieved related to that conntrack entry but the firewall is unsure what to do so fires it out un-NAT'd.

    There are two fixes noted there, either add a new iptables rule related to invalid packets, or to increase the conntrack timeout (which Bob suggested).

    I'm going to be checking our firewall at the office when I get in this morning and see what's happening on ours.
  • So I grabbed a tcpdump trace for our UTM220(rev5) running 9.005-16. Ran the tcpdump on eth1 (our WAN port) as eth0(LAN) had a stupid amount of traffic and I'm assuming that anything with an IP of our LAN that shows up on the WAN port is bogus.

     dclfw1:/root # sudo tcpdump -nn -p -i eth1 src net 192.168.1.0/24
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 376 bytes
    09:07:47.062635 IP 192.168.1.110.51343 > 17.172.232.69.443: R 205178314:205178314(0) win 0
    09:07:47.062833 IP 192.168.1.110.51343 > 17.172.232.69.443: R 205178314:205178314(0) win 0
    09:08:04.507376 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 1047826787:1047826814(27) ack 2654590118 win 65535 
    09:08:04.508052 IP 192.168.1.122.59621 > 204.191.245.129.443: FP 3419162083:3419162110(27) ack 2926197389 win 65535 
    09:08:06.889522 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:09.197359 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:11.417198 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:14.065936 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:16.663707 IP 192.168.1.122.59639 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:19.285888 IP 192.168.1.122.59639 > 204.191.245.129.443: R 28:28(0) ack 1 win 65535
    09:08:25.480354 IP 192.168.1.122.59621 > 204.191.245.129.443: FP 0:27(27) ack 1 win 65535 
    09:08:33.874762 IP 192.168.1.122.59654 > 17.149.36.106.5223: R 3004375591:3004375591(0) win 0
    09:08:33.874970 IP 192.168.1.122.59654 > 17.149.36.106.5223: R 3004375591:3004375591(0) win 0
    09:08:39.042308 IP 192.168.1.140.56090 > 68.67.128.174.80: F 67052970:67052970(0) ack 2235900136 win 251
    09:08:39.042375 IP 192.168.1.140.56091 > 68.67.128.174.80: F 289823385:289823385(0) ack 1173683129 win 256
    09:08:39.346566 IP 192.168.1.140.56090 > 68.67.128.174.80: F 0:0(0) ack 1 win 251
    09:08:39.346622 IP 192.168.1.140.56091 > 68.67.128.174.80: F 0:0(0) ack 1 win 256
    09:08:39.701437 IP 192.168.1.140.56093 > 68.67.128.6.80: F 1692737813:1692737813(0) ack 814418747 win 254
    09:08:39.701477 IP 192.168.1.140.56092 > 68.67.128.6.80: F 1904159912:1904159912(0) ack 2775469926 win 256
    09:08:40.032986 IP 192.168.1.140.56090 > 68.67.128.174.80: F 0:0(0) ack 1 win 251
    09:08:40.033093 IP 192.168.1.140.56093 > 68.67.128.6.80: F 0:0(0) ack 1 win 254
    09:08:40.033164 IP 192.168.1.140.56091 > 68.67.128.174.80: F 0:0(0) ack 1 win 256
    09:08:40.033168 IP 192.168.1.140.56092 > 68.67.128.6.80: F 0:0(0) ack 1 win 256
    09:08:40.048966 IP 192.168.1.140.56109 > 38.71.4.136.80: F 3559515588:3559515588(0) ack 104130703 win 253
    09:08:40.641269 IP 192.168.1.140.56093 > 68.67.128.6.80: F 0:0(0) ack 1 win 254
    09:08:40.641366 IP 192.168.1.140.56092 > 68.67.128.6.80: F 0:0(0) ack 1 win 256
    09:08:40.759591 IP 192.168.1.140.56108 > 67.131.104.106.80: F 2576075948:2576075948(0) ack 3213452797 win 255
    09:08:40.759665 IP 192.168.1.140.56108 > 67.131.104.106.80: R 1:1(0) ack 1 win 0
    09:08:40.988995 IP 192.168.1.140.56100 > 68.67.128.3.80: F 3627874615:3627874615(0) ack 995476794 win 256
    09:08:40.989078 IP 192.168.1.140.56101 > 68.67.128.3.80: F 875638489:875638489(0) ack 1647211828 win 256
    09:08:41.234182 IP 192.168.1.140.56090 > 68.67.128.174.80: F 0:0(0) ack 1 win 251
    09:08:41.234237 IP 192.168.1.140.56091 > 68.67.128.174.80: F 0:0(0) ack 1 win 256
    09:08:41.297137 IP 192.168.1.140.56100 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:41.297176 IP 192.168.1.140.56101 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:41.842593 IP 192.168.1.140.56092 > 68.67.128.6.80: F 0:0(0) ack 1 win 256
    09:08:41.842632 IP 192.168.1.140.56093 > 68.67.128.6.80: F 0:0(0) ack 1 win 254
    09:08:41.906542 IP 192.168.1.140.56100 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:41.906581 IP 192.168.1.140.56101 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:43.106126 IP 192.168.1.140.56100 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:43.106166 IP 192.168.1.140.56101 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:43.636588 IP 192.168.1.140.56090 > 68.67.128.174.80: F 0:0(0) ack 1 win 251
    09:08:43.636645 IP 192.168.1.140.56091 > 68.67.128.174.80: F 0:0(0) ack 1 win 256
    09:08:44.244961 IP 192.168.1.140.56093 > 68.67.128.6.80: F 0:0(0) ack 1 win 254
    09:08:44.245001 IP 192.168.1.140.56092 > 68.67.128.6.80: F 0:0(0) ack 1 win 256
    09:08:44.713018 IP 192.168.1.140.56109 > 38.71.4.136.80: F 0:0(0) ack 1 win 253
    09:08:45.524224 IP 192.168.1.140.56100 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:45.524264 IP 192.168.1.140.56101 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:48.441450 IP 192.168.1.140.56090 > 68.67.128.174.80: F 0:0(0) ack 1 win 251
    09:08:48.441527 IP 192.168.1.140.56091 > 68.67.128.174.80: F 0:0(0) ack 1 win 256
    09:08:49.049933 IP 192.168.1.140.56092 > 68.67.128.6.80: F 0:0(0) ack 1 win 256
    09:08:49.049970 IP 192.168.1.140.56093 > 68.67.128.6.80: F 0:0(0) ack 1 win 254
    09:08:50.343476 IP 192.168.1.140.56100 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:50.343522 IP 192.168.1.140.56101 > 68.67.128.3.80: F 0:0(0) ack 1 win 256
    09:08:54.016428 IP 192.168.1.140.56109 > 38.71.4.136.80: F 0:0(0) ack 1 win 253
    09:08:58.041223 IP 192.168.1.140.56090 > 68.67.128.174.80: R 1:1(0) ack 1 win 0
    09:08:58.041281 IP 192.168.1.140.56091 > 68.67.128.174.80: R 1:1(0) ack 1 win 0
    09:08:58.665252 IP 192.168.1.140.56092 > 68.67.128.6.80: R 1:1(0) ack 1 win 0
    09:08:58.665290 IP 192.168.1.140.56093 > 68.67.128.6.80: R 1:1(0) ack 1 win 0
    09:08:59.944447 IP 192.168.1.140.56100 > 68.67.128.3.80: R 1:1(0) ack 1 win 0
    09:08:59.944485 IP 192.168.1.140.56101 > 68.67.128.3.80: R 1:1(0) ack 1 win 0
    09:09:00.662751 IP 192.168.1.140.56096 > 95.131.121.66.80: F 57118089:57118089(0) ack 3925982516 win 256
    09:09:00.662970 IP 192.168.1.140.56077 > 192.80.13.75.80: F 4209388055:4209388055(0) ack 1353647536 win 253
    09:09:00.974026 IP 192.168.1.140.56077 > 192.80.13.75.80: F 0:0(0) ack 1 win 253
    09:09:01.208097 IP 192.168.1.140.56096 > 95.131.121.66.80: F 0:0(0) ack 1 win 256
    09:09:01.582473 IP 192.168.1.140.56077 > 192.80.13.75.80: F 0:0(0) ack 1 win 253
    09:09:02.300102 IP 192.168.1.140.56096 > 95.131.121.66.80: F 0:0(0) ack 1 win 256
    09:09:02.783670 IP 192.168.1.140.56077 > 192.80.13.75.80: F 0:0(0) ack 1 win 253
    09:09:04.468459 IP 192.168.1.140.56096 > 95.131.121.66.80: F 0:0(0) ack 1 win 256
    09:09:05.186099 IP 192.168.1.140.56077 > 192.80.13.75.80: F 0:0(0) ack 1 win 253
    09:09:08.805324 IP 192.168.1.140.56096 > 95.131.121.66.80: F 0:0(0) ack 1 win 256
    09:09:09.991002 IP 192.168.1.140.56077 > 192.80.13.75.80: F 0:0(0) ack 1 win 253
    09:09:12.626946 IP 192.168.1.140.56109 > 38.71.4.136.80: F 0:0(0) ack 1 win 253
    09:09:17.447415 IP 192.168.1.140.56096 > 95.131.121.66.80: F 0:0(0) ack 1 win 256
    09:09:19.600232 IP 192.168.1.140.56077 > 192.80.13.75.80: R 1:1(0) ack 1 win 0
    ^C
    74 packets captured
    76 packets received by filter
    0 packets dropped by kernel


    Turned Strict TCP session handling on:

     dclfw1:/root # sudo tcpdump -nn -p -i eth1 src net 192.168.1.0/24
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 376 bytes
    ^C
    0 packets captured
    0 packets received by filter
    0 packets dropped by kernel


    Turned Strict TCP session handling off:
     dclfw1:/root # sudo tcpdump -nn -p -i eth1 src net 192.168.1.0/24
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 376 bytes
    09:16:41.326370 IP 192.168.1.151.61156 > 165.254.26.27.80: R 931048199:931048199(0) win 0
    09:17:05.945354 IP 192.168.1.151.61146 > 23.41.190.216.443: R 477659645:477659645(0) win 0
    09:17:05.946336 IP 192.168.1.151.61146 > 23.41.190.216.443: R 477659645:477659645(0) win 0
    09:17:11.443114 IP 192.168.1.151.61160 > 54.85.80.39.443: R 2457350721:2457350721(0) win 0
    09:17:11.443242 IP 192.168.1.151.61160 > 54.85.80.39.443: R 2457350721:2457350721(0) win 0
    09:17:20.214925 IP 192.168.1.151.61171 > 23.41.190.216.443: R 17426198:17426198(0) win 0
    09:17:26.334727 IP 192.168.1.129.55344 > 184.173.90.195.80: F 42493799:42493799(0) ack 2256213040 win 16425
    09:17:26.629077 IP 192.168.1.129.55344 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:17:27.231134 IP 192.168.1.129.55344 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:17:27.275170 IP 192.168.1.139.58687 > 192.80.13.50.443: F 4033939643:4033939643(0) ack 2444191412 win 254
    09:17:27.275219 IP 192.168.1.139.58687 > 192.80.13.50.443: R 1:1(0) ack 1 win 0
    09:17:27.275569 IP 192.168.1.139.58684 > 199.59.150.39.443: F 3331189180:3331189180(0) ack 437512520 win 256
    09:17:27.275637 IP 192.168.1.139.58684 > 199.59.150.39.443: R 1:1(0) ack 1 win 0
    09:17:27.276148 IP 192.168.1.139.58680 > 93.184.216.146.80: F 1520900710:1520900710(0) ack 1545786050 win 253
    09:17:27.276884 IP 192.168.1.139.58666 > 23.214.10.156.80: F 509474126:509474126(0) ack 3780805933 win 255
    09:17:27.276955 IP 192.168.1.139.58666 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.277046 IP 192.168.1.139.58663 > 23.214.10.156.80: F 4187596442:4187596442(0) ack 1626937360 win 255
    09:17:27.277113 IP 192.168.1.139.58663 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.277441 IP 192.168.1.139.58660 > 23.214.10.156.80: F 731069037:731069037(0) ack 1625991513 win 255
    09:17:27.277507 IP 192.168.1.139.58660 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.277648 IP 192.168.1.139.58671 > 23.214.10.156.80: F 2466771975:2466771975(0) ack 3777254726 win 255
    09:17:27.277707 IP 192.168.1.139.58671 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.277756 IP 192.168.1.139.58672 > 23.214.10.156.80: F 2923362585:2923362585(0) ack 1623028358 win 255
    09:17:27.277795 IP 192.168.1.139.58672 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.277835 IP 192.168.1.139.58669 > 23.214.10.156.80: F 1673256581:1673256581(0) ack 3769609938 win 255
    09:17:27.277900 IP 192.168.1.139.58669 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.278008 IP 192.168.1.139.58673 > 23.214.10.156.80: F 1634045202:1634045202(0) ack 3789550141 win 255
    09:17:27.278084 IP 192.168.1.139.58673 > 23.214.10.156.80: R 1:1(0) ack 1 win 0
    09:17:27.278175 IP 192.168.1.139.58668 > 23.41.250.73.80: F 4084031376:4084031376(0) ack 2176656487 win 255
    09:17:27.278237 IP 192.168.1.139.58668 > 23.41.250.73.80: R 1:1(0) ack 1 win 0
    09:17:27.586668 IP 192.168.1.139.58680 > 93.184.216.146.80: F 0:0(0) ack 1 win 253
    09:17:28.195042 IP 192.168.1.139.58680 > 93.184.216.146.80: F 0:0(0) ack 1 win 253
    09:17:28.433110 IP 192.168.1.129.55344 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:17:29.403228 IP 192.168.1.139.58680 > 93.184.216.146.80: F 0:0(0) ack 1 win 253
    09:17:30.835148 IP 192.168.1.129.55344 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:17:31.805628 IP 192.168.1.139.58680 > 93.184.216.146.80: F 0:0(0) ack 1 win 253
    09:17:35.635302 IP 192.168.1.129.55344 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:17:36.610409 IP 192.168.1.139.58680 > 93.184.216.146.80: F 0:0(0) ack 1 win 253
    09:17:45.233532 IP 192.168.1.129.55344 > 184.173.90.195.80: R 1:1(0) ack 1 win 0
    09:17:46.219961 IP 192.168.1.139.58680 > 93.184.216.146.80: R 1:1(0) ack 1 win 0
    09:18:20.260567 IP 192.168.1.110.51411 > 31.13.70.17.443: R 3433678152:3433678152(0) win 0
    09:18:20.260844 IP 192.168.1.110.51411 > 31.13.70.17.443: R 3433678152:3433678152(0) win 0
    09:18:50.907349 IP 192.168.1.110.51412 > 31.13.70.17.443: R 3867749541:3867749541(0) win 0
    09:18:50.907450 IP 192.168.1.110.51412 > 31.13.70.17.443: R 3867749541:3867749541(0) win 0
    09:18:56.998664 IP 192.168.1.129.55425 > 184.173.90.195.80: F 700686710:700686710(0) ack 132501171 win 16425
    09:18:57.296390 IP 192.168.1.129.55425 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:18:57.904821 IP 192.168.1.129.55425 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:18:59.106044 IP 192.168.1.129.55425 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    09:19:01.508498 IP 192.168.1.129.55425 > 184.173.90.195.80: F 0:0(0) ack 1 win 16425
    ^C
    49 packets captured
    49 packets received by filter
    0 packets dropped by kernel


    Hmm...

    As an aside, all but two of those IP addresses, Apple devices (iPhones and an iPad)
  • Here the answer I've got from support:

    "I would suspect you are seeing this due to a configuration error with respect to cabling or your switch configuration.
    Please can you ensure that your vlans are separated and that you are not using the UTM as a trunk interface?"

    Never used my FW as trunk, and not sure exactly what they mean by separated Vlan.
  • Assuming I'm seeing on my box what you are, I can't see it being a cabling or VLAN issue.

    My setup goes {Modem} - {Switch} - {UTM} - {Switch} - (LAN). The switches are two physically separate devices, the switch up front (a dumb 5pt Cisco/Linksys SMB model), exists solely for HA support. No VLAN's here.

    The only thing I did also notice, when I set the tcpdump to include both src and dst (not just src as in my prev runs) is a bunch of traffic on eth1 from 192.168.2.x which is a remote office connected to this UTM via an IPSEC tunnel. I also wasn't expecting to see that on the WAN interface. Interestingly enough the traffic between both sites that I'm watching right now is a bunch of traffic between the remote & local AD DC's as well as two clients talking to an App Server.