Internet speed slower in bridge mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
98 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Internet speed slower in bridge mode

breda
Hi, we upgraded our internet speed to 100 Mbs and doing speed test with the Shield we are only getting  50.86 Mbs if  I bypass the shield I get a speed of 105.29 Mbs  here are some  of my logs and screen shots  any help would be appreciated











Fri Jul 29 12:26:58 2016 daemon.notice snort[9381]: 81 out of 1024 flowbits in use.
Fri Jul 29 12:27:01 2016 daemon.crit dnsmasq[9436]: illegal repeated keyword at line 13 of /var/etc/dnsmasq.conf
Fri Jul 29 12:27:01 2016 daemon.crit dnsmasq[9436]: FAILED to start up
Fri Jul 29 12:27:06 2016 daemon.crit dnsmasq[9451]: illegal repeated keyword at line 13 of /var/etc/dnsmasq.conf
Fri Jul 29 12:27:06 2016 daemon.crit dnsmasq[9451]: FAILED to start up
Fri Jul 29 12:27:06 2016 daemon.info procd: Instance dnsmasq::instance1 s in a crash loop 6 crashes, 0 seconds since last crash
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: [ Port Based Pattern Matching Memory ]
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: +- [ Aho-Corasick Summary ] -------------------------------------
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Storage Format    : Full
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Finite Automaton  : DFA
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Alphabet Size     : 256 Chars
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Sizeof State      : Variable (1,2,4 bytes)
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Instances         : 89
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     1 byte states : 79
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     2 byte states : 10
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     4 byte states : 0
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Characters        : 56026
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | States            : 37567
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Transitions       : 2021513
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | State Density     : 21.0%
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Patterns          : 4051
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Match States      : 4142
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: | Memory (MB)       : 19.93
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |   Patterns        : 0.42
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |   Match Lists     : 1.06
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |   DFA
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     1 byte states : 0.54
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     2 byte states : 17.70
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: |     4 byte states : 0.00
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: +----------------------------------------------------------------
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: [ Number of patterns truncated to 20 bytes: 913 ]
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: afpacket DAQ configured to inline.
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Acquiring network traffic from "eth0:eth2".
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Initializing daemon mode
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Daemon initialized, signaled parent pid: 1
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Reload thread starting...
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Reload thread started, thread 0xffe53af210 (9457)
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Checking PID path...
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: PID path stat checked out ok, PID path set to /var/snort/
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Writing PID "9381" to file "/var/snort//snort_eth0:eth2.pid"
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:         --== Initialization Complete ==--
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:    ,,_     -*> Snort! <*-
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:   o"  )~   Version 2.9.7.2 GRE (Build 177)
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:    ''''    By Martin Roesch & The Snort Team: http://www.snort.org/contact#team
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Copyright (C) 1998-2013 Sourcefire, Inc., et al.
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Using libpcap version 1.5.3
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Using PCRE version: 8.36 2014-09-26
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Using ZLIB version: 1.2.8
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Rules Engine: SF_SNORT_DETECTION_ENGINE  Version 2.4  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_MODBUS  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_SIP  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_DNP3  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_SMTP  Version 1.1  <Build 9>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_DCERPC2  Version 1.0  <Build 3>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_GTP  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_SSH  Version 1.1  <Build 3>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_DNS  Version 1.1  <Build 4>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_REPUTATION  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_FTPTELNET  Version 1.2  <Build 13>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_SSLPP  Version 1.1  <Build 4>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_IMAP  Version 1.0  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_SDF  Version 1.1  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]:            Preprocessor Object: SF_POP  Version 1.0  <Build 1>
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Commencing packet processing (pid=9381)
Fri Jul 29 12:27:08 2016 daemon.notice snort[9381]: Decoding Ethernet
Fri Jul 29 12:29:58 2016 daemon.notice snort[9381]: S5: Session exceeded configured max bytes to queue 1090276 using 1090841 bytes (server queue). 66.234.209.81 60501 --> 216.38.158.170 8080 (0) : LWstate 0xf LWFlags 0x406007
Fri Jul 29 12:30:03 2016 daemon.notice snort[9381]: S5: Session exceeded configured max bytes to queue 1090276 using 1090335 bytes (server queue). 66.234.209.81 60502 --> 216.38.158.170 8080 (0) : LWstate 0xf LWFlags 0x406007
Fri Jul 29 12:30:56 2016 daemon.notice snort[9381]: S5: Session exceeded configured max bytes to queue 1090276 using 1091563 bytes (server queue). 66.234.209.81 60801 --> 216.38.158.170 8080 (0) : LWstate 0x9 LWFlags 0x406007
Fri Jul 29 12:31:08 2016 daemon.notice snort[9381]: S5: Session exceeded configured max bytes to queue 1090276 using 1090426 bytes (server queue). 66.234.209.81 60799 --> 216.38.158.170 8080 (0) : LWstate 0x9 LWFlags 0x6007
Fri Jul 29 12:45:05 2016 authpriv.info dropbear[5450]: Exit (root): Exited normally
Fri Jul 29 12:45:05 2016 authpriv.warn dropbear[5450]: Couldn't set SO_PRIORITY (Bad file descriptor)



Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
I  noticed when I run speed test  I see this in the system logs

Sun Jul 31 11:49:49 2016 daemon.notice snort[16777]: S5: Session exceeded configured max bytes to queue 1090276 using 1091183 bytes (server queue). 66.234.209.81 54433 --> 204.11.104.30 8080 (0) : LWstate 0x9 LWFlags 0x406007
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

Hans
Administrator
Hi breda

i found this about the snort settings in http://seclists.org/snort/2014/q3/944: 

khan wrote
I sorta fixed the problem but honestly, I'm not sure if it's the right solution (Just don't know what the heck I'm
doing. First time installing snort)

I did two things:

  1.  I had 4 ports spanned to snort's monitoring promiscuous interface. Snort's switch interface had tons of packet
drops. Way too much traffic which I believe contribute to buffering overflow. Also, with tons of dropped packets snort
is not able to see RX and TX in order to analyze traffic? (Don't know for sure but still researching. I don't know what
info snort requires in order to analyze traffic. Does it require a complete established sessions before analyzing? For
testing purposes, I removed stream5_tcp: 'requires_3whs' (3 way handshakes) but that didn't help). In any case, having
one span port to snort alleviates helps a lot. Dropping tons of packets is never a good thing :)
  2.  I've also changed and added the following parameters (in red below) in /etc/snort/snort.conf. Max_queued_bytes
and max_queued_segs seems to help a lot to remove these messages. My box has tons of memory so I figured 80MB and 40MB
respectively should be ok.

# Target-Based stateful inspection/stream reassembly. For more inforation, see README.stream5
preprocessor stream5_global: track_tcp yes, \
track_udp yes, \
track_icmp no, \
memcap 1073741824, \
max_tcp 1048576, \
max_udp 1048576, \
prune_log_max 1073741824, \
max_active_responses 4, \
min_response_seconds 6
preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
   overlap_limit 10, small_segments 3 bytes 150, timeout 180, max_queued_bytes 90485760, max_queued_segs 40485760, \
so he changed the preprocessor_stream5_ctp and increased the mex_queued_* values. (Snort manual - 2.2.2 Session)

You could play with these settings but I lack the insight how one setting effects another as I am not too familiar with snort fine tuning.
Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Thanks Hans I will give it a try
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

user8446
Administrator
Hi Breda,

Here is how to do it: http://itus.accessinnov.com/Internet-dropping-out-in-bridge-mode-td28.html

You should be getting > 100mb with your shield
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Thanks user8446 I copied and paste  in  intrusion prevention > snort config


but I'm still only getting  57.30Mbs download  and did click save and apply


Wed Aug  3 17:14:50 2016 daemon.notice snort[19488]: S5: Session exceeded configured max bytes to queue 1112290 using 1113408 bytes (client queue). 66.234.209.81 49513 --> 204.11.104.30 8080 (0) : LWstate 0x9 LWFlags 0x406007
Wed Aug  3 17:15:12 2016 daemon.notice snort[19488]: S5: Session exceeded configured max bytes to queue 1112290 using 1112582 bytes (server queue). 66.234.209.81 49539 --> 204.11.104.30 8080 (0) : LWstate 0x9 LWFlags 0x406007
Wed Aug  3 17:15:13 2016 daemon.notice snort[19488]: S5: Session exceeded configured max bytes to queue 1112290 using 1113640 bytes (server queue). 66.234.209.81 49538 --> 204.11.104.30 8080 (0) : LWstate 0x9 LWFlags 0x6007
Wed Aug  3 17:15:24 2016 daemon.notice snort[19488]: S5: Session exceeded configured max bytes to queue 1112290 using 1112991 bytes (server queue). 66.234.209.81 49540 --> 204.11.104.30 8080 (0) : LWstate 0x9 LWFlags 0x406007

 

preprocessor stream5_global: track_tcp yes, \
   track_udp yes, \
   track_icmp yes, \
   max_tcp 10000, \
   max_udp 10000, \
   max_active_responses 2, \
   min_response_seconds 5, \
   prune_log_max 1170355

preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
   overlap_limit 10, small_segments 3 bytes 150, timeout 180, \
   max_queued_bytes 1112290, \
    ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \
        161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \
        7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \
    ports both 36 80 81 82 83 84 85 86 87 88 89 90 110 311 383 443 465 563 555 591 593 631 636 801 808 818 901 972 989 992 993 994 995 1158 1220 1414 1533 1741 1830 1942 2231 2301 2381 2809 2980 3029 3037 3057 3128 3443 3702 4000 4343 4848 5000 5117 5250 5600 6080 6173 6988 7907 7000 7001 7071 7144 7145 7510 7802 7770 7777 7778 7779 \
        7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \
        7917 7918 7919 7920 8000 8008 8014 8028 8080 8081 8082 8085 8088 8090 8118 8123 8180 8181 8222 8243 8280 8300 8333 8344 8500 8509 8800 8888 8899 8983 9000 9060 9080 9090 9091 9111 9290 9443 9999 10000 11371 12601 13014 15489 29991 33300 34412 34443 34444 41080 44449 50000 50002 51423 53331 55252 55555 56712
preprocessor stream5_udp: timeout 180
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

user8446
Administrator
Breda,

Change to the following:

prune_log_max 2097152

max_queued_bytes 2097152
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Hi,  user8446 thanks I updated the files but still the same speed  I will attached my Snort Config  and system logs

Thanks for all the help

logs

Snort_Config.txt

system_log.txt






I seen this in the IPS log

08/04-16:52:12.071792  [Drop] [**] [1:2402000:4156] ET DROP Dshield Block Listed Source group 1 [**] [Classification: Misc Attack] [Priority: 2] {TCP} 93.174.93.136:49243 -> 66.234.209.81:5050
08/04-16:57:28.610636  [Drop] [**] [1:2402000:4156] ET DROP Dshield Block Listed Source group 1 [**] [Classification: Misc Attack] [Priority: 2] {TCP} 183.60.48.25:12210 -> 66.234.209.81:3306

------------------------------------------------------------------------------------------------
with shield
Download Speed: 56801 kbps (7100.1 KB/sec transfer rate)
Upload Speed: 6146 kbps (768.3 KB/sec transfer rate)
Latency: 11 ms
Jitter: 8 ms

---------------------------------------------------------------------------------------
without Shield
Download Speed: 105786 kbps (13223.3 KB/sec transfer rate)
Upload Speed: 6248 kbps (781 KB/sec transfer rate)
Latency: 10 ms
Jitter: 4 ms

----------------------------------------------------------------------------------

I also see few erorrs in the log

Thu Aug  4 16:38:32 2016 authpriv.info dropbear[3230]: Early exit: Terminated by signal
Thu Aug  4 16:38:32 2016 authpriv.info dropbear[3228]: Early exit: Terminated by signal
Thu Aug  4 16:38:33 2016 authpriv.info dropbear[5256]: Not backgrounding
Thu Aug  4 16:38:33 2016 authpriv.info dropbear[5257]: Not backgrounding
Thu Aug  4 16:38:33 2016 authpriv.warn dropbear[5259]: Failed listening on '22': Error listening: Address already in use
Thu Aug  4 16:38:33 2016 authpriv.info dropbear[5259]: Early exit: No listening ports available.
Thu Aug  4 16:38:33 2016 authpriv.warn dropbear[5258]: Failed listening on '22': Error listening: Address already in use
Thu Aug  4 16:38:33 2016 authpriv.info dropbear[5258]: Early exit: No listening ports available.
Thu Aug  4 16:45:39 2016 daemon.emerg procd: 42584 85123.238  116403.0     55.9  416459729.3  29327.4         0
Thu Aug  4 16:45:39 2016 user.notice root: Successful NTP clock adjust (0.us.pool.ntp.org).
Thu Aug  4 16:45:39 2016 daemon.info procd: - init complete -
Thu Aug  4 16:47:51 2016 daemon.notice snort[5099]: S5: Session exceeded configured max bytes to queue 2097152 using 2098566 bytes (server queue). 66.234.209.81 61853 --> 69.42.31.34 8080 (0) : LWstate 0x9 LWFlags 0x6007
Thu Aug  4 16:47:51 2016 daemon.notice snort[5099]: S5: Session exceeded configured max bytes to queue 2097152 using 2098032 bytes (server queue). 66.234.209.81 61855 --> 69.42.31.34 8080 (0) : LWstate 0x9 LWFlags 0x6007

Thu Aug  4 16:48:58 2016 kern.info kernel: [  344.310022] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
---------------------------------------------------------------------------------------------------------------------------------------------------







Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

user8446
Administrator
Ok, let's triple it to 3 megs for the queue:

prune_log_max 2097152

max_queued_bytes 3137628

I would also disable unused preprocessors. Hans wrote a script to run which makes it really easy: http://itus.accessinnov.com/Bridge-mode-bugfix-and-performance-improvement-tp561p593.html
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Hi, user8446 I'm Sorry it took so long for me to get back to you I  updated the size

but only getting

DOWNLOAD
48.98Mb/s

also on  would also disable unused preprocessors. Hans wrote a script to run which makes it really easy I see few files can you tell me the one should use and would I WinSCP them and run them via SSH?



prune_log_max 2097152

max_queued_bytes 3137628


Sat Aug 20 12:17:25 2016 daemon.notice snort[12543]: S5: Session exceeded configured max bytes to queue 3137628 using 3138244 bytes (server queue). 66.234.209.81 62630 --> 208.69.40.37 8080 (0) : LWstate 0xf LWFlags 0x6007
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

Roadrunnere42
Breda

just copy the file to the temp folder /tmp on the shield with the WinSCP program and then run it via SSH?
The script run very fast and you should see the words "moved files"
job done

snort_preproc_move.sh

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Thanks Roadrunnere42  what script  do I use in SSH ?


Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

Roadrunnere42
The script you have to run is  snort_preproc_move.sh  which i posted in my previous reply and is the one Hans put together.

Roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Hi, Roadrunnere42 thanks but I can't get it to run here are some screen shots













Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

Roadrunnere42
type the following

cd /tmp
(then press enter) this will take you to the tmp folder, as the shield is based on linux you have to tell the shield that the script in actually in the folder you are in, this is done by put ./ in front for the script name
so i normally do
sh ./(name of script)

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Hi, Roadrunnere42 thanks so for my name it should be  sh ./ snort_preproc_move.sh  ?

Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
In reply to this post by Roadrunnere42
Hi, Roadrunnere42 seem to be getting  access denied thanks for the help
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
seem to get this error

 
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

breda
Reply | Threaded
Open this post in threaded view
|

Re: Internet speed slower in bridge mode

Roadrunnere42
Breda

you have a space after ./

sh ./ snort_preproc_move.sh

it should read

sh ./snort_preproc_move.sh

Roadrunnere42
12345