Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in v5.5.4r some url coming broken - with Transparent HTTPS #810

Open
szrce opened this issue Apr 30, 2024 · 38 comments
Open

in v5.5.4r some url coming broken - with Transparent HTTPS #810

szrce opened this issue Apr 30, 2024 · 38 comments
Assignees
Labels

Comments

@szrce
Copy link

szrce commented Apr 30, 2024

hello @philipianpearce ,

in v5.5.4r some url coming broken like bellow when you going eg instagram, when you open chrome and search instagram, chrome first of all sending request this url (content-autofill.googleapis.co) actually (content-autofill.googleapis.com). if e2guardian cant reach dns address, will be getting error page like proxy refused from google-chrome.

when , dns req, e2guardian log i examine : e2guardian sending dns request broken host address.

can you check bug or configuration mistake?

thanks in advance.

e2guardian554-requesterror

e2guardian554pcap2
e2guardian554-requesterror2

@philipianpearce
Copy link
Contributor

philipianpearce commented Apr 30, 2024 via email

@sezer
Copy link

sezer commented Apr 30, 2024

@szrce FYI

@szrce
Copy link
Author

szrce commented Apr 30, 2024

hi, @philipianpearce

i did build from freebsd and i installed freebsd pfsense, the installed os like bellow.

is it same debug options ?

FreeBSD pfSense.home.arpa 14.0-CURRENT FreeBSD 14.0-CURRENT amd64 1400094 #0 RELENG_2_7_1-n255918-774957be06d: Fri Nov 10 06:31:34 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_1-main/obj/amd64/GScwGwyy/var/jenkins/workspace/pfSense-CE-snapshots-2_7_1-main/sources/FreeBSD-src-RELENG_2_7_1/amd64.amd64/sys/pfSense amd64

@szrce
Copy link
Author

szrce commented Apr 30, 2024

maybe help you this log(when i find new log i will be added bellow) , you can search like start words - Name does not reso

1714479594 hw821: ListCheck:localbanned NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: ListCheck:semiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: ListCheck:exception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: ListCheck:exceptionuseragent NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: ListCheck:banned NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: ListCheck:sslreplace NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821: May_be_loop = 0  port 443 connectUpstream():ConnectionHandler.cpp:412
1714479594 hw821: Connecting to IP 142.250.184.142 port 443 connectUpstream():ConnectionHandler.cpp:518
1714479594 hw821: SEZER SOCKET MULTI WAN FILE0 connect():Socket.cpp:210
1714479594 hw851: Got connection upfailure is 0 connectUpstream():ConnectionHandler.cpp:522
1714479594 hw821: Got connection upfailure is 0 connectUpstream():ConnectionHandler.cpp:522
1714479594 listen_2_thttps: 2: got connection from accept accept_connections():FatController.cpp:1236
1714479594 listen_2_thttps: 2: pushed connection to http_worker_Q accept_connections():FatController.cpp:1245
1714479594 hw859:  popped connection from http_worker_Q handle_connections():FatController.cpp:382
1714479594 hw859: ListCheck:nomitm NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714479594 hw859: ListCheck:bannedclient NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714479594 hw859: ListCheck:exceptionclient NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:authexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859:  -Not got persistent credentials for this connection - querying auth plugins doAuth():ConnectionHandler.cpp:2664
1714479594 hw859:  -Querying next auth plugin... doAuth():ConnectionHandler.cpp:2675
1714479594 hw859: sezer search look IP 192.168.1.11 to straight IP list getIPMapData():ListContainer.cpp:1876
1714479594 hw859: Matched IP 192.168.1.11 to range getIPMapData():ListContainer.cpp:1899
1714479594 hw859: ListCheck:ipmap NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:localsemiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:localexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:localgreyssl NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:localgrey NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:localbanned NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:semiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:exception NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:exceptionuseragent NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:banned NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: ListCheck:sslreplace NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859: May_be_loop = 0  port 443 connectUpstream():ConnectionHandler.cpp:412
1714479594 hw859: Connecting to IP 142.250.184.142 port 443 connectUpstream():ConnectionHandler.cpp:518
1714479594 hw859: SEZER SOCKET MULTI WAN FILE0 connect():Socket.cpp:210
1714479594 hw859: Got connection upfailure is 0 connectUpstream():ConnectionHandler.cpp:522
1714479594 hw1004: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw1004:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479594 hw1004:  -...built doLog():ConnectionHandler.cpp:1578
1714479594 hw1004: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479594 log: received a log request log_listener():FatController.cpp:608
1714479594 hw1004:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479594 hw821: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw821:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479594 hw821:  -...built doLog():ConnectionHandler.cpp:1578
1714479594 log: received a log request log_listener():FatController.cpp:608
1714479594 hw821: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479594 hw821:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479594 hw859: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479594 hw859:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479594 hw859:  -...built doLog():ConnectionHandler.cpp:1578
1714479594 log: received a log request log_listener():FatController.cpp:608
1714479594 hw859: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479594 hw859:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479595 listen_2_thttps: 2: got connection from accept accept_connections():FatController.cpp:1236
1714479595 listen_2_thttps: 2: pushed connection to http_worker_Q accept_connections():FatController.cpp:1245
1714479595 hw859:  popped connection from http_worker_Q handle_connections():FatController.cpp:382
1714479595 hw859: handle_peer returned: -1 handle_connections():FatController.cpp:395
1714479595 hw859:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479595 listen_2_thttps: 2: got connection from accept accept_connections():FatController.cpp:1236
1714479595 listen_2_thttps: 2: pushed connection to http_worker_Q accept_connections():FatController.cpp:1245
1714479595 hw859:  popped connection from http_worker_Q handle_connections():FatController.cpp:382
1714479595 hw859: handle_peer returned: -1 handle_connections():FatController.cpp:395
1714479595 hw859:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479595 hw872: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479595 hw872:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479595 hw872:  -...built doLog():ConnectionHandler.cpp:1578
1714479595 log: received a log request log_listener():FatController.cpp:608
1714479595 hw872: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479595 hw872:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479596 hw477: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479596 hw477:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479596 hw477:  -...built doLog():ConnectionHandler.cpp:1578
1714479596 hw477: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479596 log: received a log request log_listener():FatController.cpp:608
1714479596 hw477:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479596 hw852: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479596 hw852:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479596 hw852:  -...built doLog():ConnectionHandler.cpp:1578
1714479596 log: received a log request log_listener():FatController.cpp:608
1714479596 hw852: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479596 hw852:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479596 hw608: connectUpstream: getaddrinfo returned 8 for srv-cdn.onedio. Name does not resolve connectUpstream():ConnectionHandler.cpp:472
1714479596 hw608: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479596 hw983: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479596 hw608:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479596 hw983:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479596 hw608:  -...built doLog():ConnectionHandler.cpp:1578
1714479596 hw983:  -...built doLog():ConnectionHandler.cpp:1578
1714479596 hw608: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479596 log: received a log request log_listener():FatController.cpp:608
1714479596 log: received a log request log_listener():FatController.cpp:608
1714479596 hw608:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479596 hw983: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479596 hw983:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479597 hw585: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479597 hw585:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479597 hw585:  -...built doLog():ConnectionHandler.cpp:1578
1714479597 log: received a log request log_listener():FatController.cpp:608
1714479597 hw585: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479597 hw585:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479597 master: busychildren:76 worker Q size:0 fc_controlit():FatController.cpp:1652
1714479598 hw489: connectUpstream: getaddrinfo returned 8 for tpc. Name does not resolve connectUpstream():ConnectionHandler.cpp:472
1714479598 hw489: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479598 hw489:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479598 hw489:  -...built doLog():ConnectionHandler.cpp:1578
1714479598 hw489: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479598 hw489:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479598 log: received a log request log_listener():FatController.cpp:608
1714479599 hw876: connectUpstream: getaddrinfo returned 8 for s2.adfoö Name does not resolve connectUpstream():ConnectionHandler.cpp:472
1714479599 hw876: ListCheck:nolog NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876:  -Building raw log data string...  doLog():ConnectionHandler.cpp:1534
1714479599 hw876:  -...built doLog():ConnectionHandler.cpp:1578
1714479599 hw876: handle_peer returned: 0 handle_connections():FatController.cpp:395
1714479599 log: received a log request log_listener():FatController.cpp:608
1714479599 hw876:  waiting connection on http_worker_Q  handle_connections():FatController.cpp:379
1714479599 listen_2_thttps: 2: got connection from accept accept_connections():FatController.cpp:1236
1714479599 listen_2_thttps: 2: pushed connection to http_worker_Q accept_connections():FatController.cpp:1245
1714479599 hw876:  popped connection from http_worker_Q handle_connections():FatController.cpp:382
1714479599 hw876: ListCheck:nomitm NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714479599 hw876: ListCheck:bannedclient NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714479599 hw876: ListCheck:exceptionclient NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:authexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876:  -Not got persistent credentials for this connection - querying auth plugins doAuth():ConnectionHandler.cpp:2664
1714479599 hw876:  -Querying next auth plugin... doAuth():ConnectionHandler.cpp:2675
1714479599 hw876: sezer search look IP 192.168.1.11 to straight IP list getIPMapData():ListContainer.cpp:1876
1714479599 hw876: Matched IP 192.168.1.11 to range getIPMapData():ListContainer.cpp:1899
1714479599 hw876: ListCheck:ipmap NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:localsemiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:localexception NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:localgreyssl NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:localgrey NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:localbanned NOT FOUND runFunct():StoryBoard.cpp:584
1714479599 hw876: ListCheck:semiexception NOT FOUND runFunct():StoryBoard.cpp:584

1714480274 hw1011: sezer search look IP 192.168.1.11 to straight IP list getIPMapData():ListContainer.cpp:1876
1714480274 hw1011: Matched IP 192.168.1.11 to range getIPMapData():ListContainer.cpp:1899
1714480274 hw1011: ListCheck:ipmap NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:localsemiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:localexception NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:localgreyssl NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:localgrey NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:localbanned NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:semiexception NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:exception NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:exceptionuseragent NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:banned NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: ListCheck:sslreplace NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw1011: May_be_loop = 0  port 443 connectUpstream():ConnectionHandler.cpp:412
1714480274 hw1011: Connecting to IP 157.240.234.35 port 443 connectUpstream():ConnectionHandler.cpp:518
1714480274 hw1011: SEZER SOCKET MULTI WAN FILE0 connect():Socket.cpp:210
1714480274 hw1011: Got connection upfailure is 0 connectUpstream():ConnectionHandler.cpp:522
1714480274 listen_2_thttps: 2: got connection from accept accept_connections():FatController.cpp:1236
1714480274 listen_2_thttps: 2: pushed connection to http_worker_Q accept_connections():FatController.cpp:1245
1714480274 hw986:  popped connection from http_worker_Q handle_connections():FatController.cpp:382
1714480274 hw986:  -Building raw log data string...  doRQLog():ConnectionHandler.cpp:1645
1714480274 hw986:  -...built doRQLog():ConnectionHandler.cpp:1685
1714480274 hw986: ListCheck:nomitm NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 RQlog: received a log request log_listener():FatController.cpp:608
1714480274 hw986: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714480274 hw986: ListCheck:bannedclient NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 hw986: inIPList  no match for 192.168.1.11 inIPList():ListContainer.cpp:2294
1714480274 hw986: ListCheck:exceptionclient NOT FOUND runFunct():StoryBoard.cpp:584
1714480274 RQlog: Error in logline 34 0

0
0
0
https://content-autofill.googleapis.com
hw986: THTTPS_TLS_SNI


192.168.1.11

554ranotherlog

@philipianpearce If you need more logs, you can guide me, how can I deep detail log

@philipianpearce
Copy link
Contributor

@sezer

Can you increase the debuglevel by adding

debuglevel = "thttps"

to e2guardian.conf and let me see the output? That should help us to see where the corruption is happening.

Thanks
Philip

@szrce
Copy link
Author

szrce commented May 2, 2024

@philipianpearce

debuglog.txt
for example anews.com.tr i cant reach first, when i second click i did opened debuglog1.txt
i didint open this domain bursahaber.com the browser gave this message connection refused : debuglog3.txt and accesslog:
accessLast.log

@philipianpearce
Copy link
Contributor

The debuglevel = thttps does not seem to have worked.
Where is your debug output to? If to stderr, then change debuglevel to thttps:stderr.

@szrce
Copy link
Author

szrce commented May 2, 2024

The debuglevel = thttps does not seem to have worked. Where is your debug output to? If to stderr, then change debuglevel to thttps:stderr.

did you see new files? current log section i did add new.

@philipianpearce
Copy link
Contributor

Can you check e2config.h file? Both DEBUG_LOW and DEBUG_HIGH should be defined to get full debug.

@szrce
Copy link
Author

szrce commented May 2, 2024

Can you check e2config.h file? Both DEBUG_LOW and DEBUG_HIGH should be defined to get full debug.

i think is open? am i wrong?

Running in debug_low mode...
e2guardian 5.5.4r

Built with: '--with-logdir=/var/log' '--with-piddir=/var/run' '--disable-avastd' '--enable-clamd' '--with-debug_high=on' '--with-debug_low=on' '--enable-dnsauth=on' '--disable-icap' '--disable-kavd' '--enable-sslmitm' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++11 ' 'LDFLAGS= -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/root/pfSense/FreeBSD-ports/www/e2guardian/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig'

@szrce
Copy link
Author

szrce commented May 2, 2024

Can you check e2config.h file? Both DEBUG_LOW and DEBUG_HIGH should be defined to get full debug.

i think is open? am i wrong?

Running in debug_low mode... e2guardian 5.5.4r

Built with: '--with-logdir=/var/log' '--with-piddir=/var/run' '--disable-avastd' '--enable-clamd' '--with-debug_high=on' '--with-debug_low=on' '--enable-dnsauth=on' '--disable-icap' '--disable-kavd' '--enable-sslmitm' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++11 ' 'LDFLAGS= -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/root/pfSense/FreeBSD-ports/www/e2guardian/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig'

/work/e2guardian-5.5.4r # cat e2config.h | grep "DEBUG_*"
#define DEBUG_HIGH 1
#define DEBUG_LOW 1

@szrce
Copy link
Author

szrce commented May 2, 2024

Can you check e2config.h file? Both DEBUG_LOW and DEBUG_HIGH should be defined to get full debug.

i think is open? am i wrong?
Running in debug_low mode... e2guardian 5.5.4r
Built with: '--with-logdir=/var/log' '--with-piddir=/var/run' '--disable-avastd' '--enable-clamd' '--with-debug_high=on' '--with-debug_low=on' '--enable-dnsauth=on' '--disable-icap' '--disable-kavd' '--enable-sslmitm' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++11 ' 'LDFLAGS= -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/root/pfSense/FreeBSD-ports/www/e2guardian/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig'

/work/e2guardian-5.5.4r # cat e2config.h | grep "DEBUG_*" #define DEBUG_HIGH 1 #define DEBUG_LOW 1

like a this option here it is new log files.
debuglevel = 'ALL:file:/var/log/e2guardian/alldebug.log'

alldebug.log

@philipianpearce
Copy link
Contributor

philipianpearce commented May 2, 2024 via email

@szrce
Copy link
Author

szrce commented May 2, 2024

Can you check e2config.h file? Both DEBUG_LOW and DEBUG_HIGH should be defined to get full debug.

i think is open? am i wrong?
Running in debug_low mode... e2guardian 5.5.4r
Built with: '--with-logdir=/var/log' '--with-piddir=/var/run' '--disable-avastd' '--enable-clamd' '--with-debug_high=on' '--with-debug_low=on' '--enable-dnsauth=on' '--disable-icap' '--disable-kavd' '--enable-sslmitm' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++11 ' 'LDFLAGS= -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/root/pfSense/FreeBSD-ports/www/e2guardian/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig'

/work/e2guardian-5.5.4r # cat e2config.h | grep "DEBUG_*" #define DEBUG_HIGH 1 #define DEBUG_LOW 1

like a this option here it is new log files. debuglevel = 'ALL:file:/var/log/e2guardian/alldebug.log'

alldebug.log

did you check this one, and other files maybe help you?

@philipianpearce
Copy link
Contributor

OK that's good - looks like an issue with the TLS client hello parsing on transparent HTTPS filtering - I will try and have a look at a fix for it tomorrow.

@philipianpearce philipianpearce self-assigned this May 2, 2024
@philipianpearce philipianpearce changed the title in v5.5.4r some url coming broken in v5.5.4r some url coming broken - with Transparent HTTPS May 2, 2024
@philipianpearce
Copy link
Contributor

@szrce I've uploaded to github a test branch v5.5.sni. Can you try this (with debug) and see if this fixes the issue?

I have increased the buffer size for the client hello and also corrected the toread so that it will read the full clienthello.

I'm am a bit puzzled as there were already limit checks in get_TLS_SNI which should have prevented the garbled SNI being returned. IF it tests OK, I'll roll into v5.5 and v5.6.dev

@szrce
Copy link
Author

szrce commented May 3, 2024

OK that's good, but why missing __SSLMITM options, configure.ac is it diffrent 5.5.4r.

@philipianpearce
Copy link
Contributor

philipianpearce commented May 3, 2024

__SSLMITM options was redundant - is enabled by default in all v5.5 - configure.ac has been tidied to remove redundant options and remove anomalies (e.g. enable-sslmitm was required to load libraries when no longer any MITM conditional code, ssl libraries now enabled by default)

Would you sent me debug on v5.5.sni so that I can check it is working as I expect? Thanks.

@szrce
Copy link
Author

szrce commented May 3, 2024

here it is,

if dont send lots request over everythink is ok. but send request average 15 page getting NETERROR, i did add screenshots.

debuglog.txt

and others output screens
e2guardian555r

e2guardian555r-brows
e2guardian555r2
e2guardian555r3

@szrce
Copy link
Author

szrce commented May 6, 2024

hi @philipianpearce,

were you able to check it?

I'm still getting errors.

@philipianpearce
Copy link
Contributor

@szrce NETERROR indicates a problem in the DNS lookup or network path to the requested site. If the message 'is not responding' then it means that the site is rejecting (or not completing the TCP handshake) or there is some intermittent network issue in the path to the site. In any case a NETERROR message is reporting an issue from the operating system, so it is not a bug.

Thanks for the trace, it shows that clienthello messages are often large, so I need to further increase the buffer size, however the SNI now seem to be being extracted correctly and not being truncated.

@szrce
Copy link
Author

szrce commented May 7, 2024

@philipianpearce thank you for your information,

i will check detail NETERROR problem, cause i am not sure.

on the other hand, if you fix clienthello size i can try.

thanks.

@philipianpearce
Copy link
Contributor

philipianpearce commented May 8, 2024

@szrce I have changed clienthello buffer size to dynamic. (in v5.5.sni) Would you retest? Thanks.

@szrce
Copy link
Author

szrce commented May 9, 2024

@philipianpearce hi, until 3/5 second, then was killed with your last commit.

May 9 10:05:44 pfSense kernel: swap_pager: out of swap space
May 9 10:05:44 pfSense kernel: swp_pager_getswapspace(29): failed
May 9 10:05:45 pfSense kernel: pid 27902 (e2guardian), jid 0, uid 65534, was killed: failed to reclaim memory
May 9 10:05:49 pfSense kernel: pid 44841 (unbound), jid 0, uid 59, was killed: failed to reclaim memory
May 9 10:05:51 pfSense kernel: pid 397 (php-fpm), jid 0, uid 0, was killed: failed to reclaim memory
May 9 10:05:51 pfSense kernel: swap_pager: out of swap space
May 9 10:05:51 pfSense kernel: swp_pager_getswapspace(8): failed
May 9 10:05:52 pfSense kernel: swap_pager: out of swap space
May 9 10:05:52 pfSense kernel: swp_pager_getswapspace(24): failed

@philipianpearce
Copy link
Contributor

Odd, have reverted to fixed buffer in latest v5.5.sni. Does that fix it?

@szrce
Copy link
Author

szrce commented May 9, 2024

yeap is working with revert, there is no swap exit or kernel dumps, but is still get error like bellow

errore2g

@philipianpearce
Copy link
Contributor

I have re-checked the SNI logic and added some more checks to ensure we only act on correct format.
Would you try latest v5.5.sni?

@szrce
Copy link
Author

szrce commented May 13, 2024

I have re-checked the SNI logic and added some more checks to ensure we only act on correct format. Would you try latest v5.5.sni?

still same check it bellow image, its still coming broke url

e2guardian

@szrce
Copy link
Author

szrce commented May 16, 2024

@philipianpearce, is still up?

@sehzade58
Copy link

@philipianpearce I'm experiencing a similar problem. I'm using pfSense 2.7.0 and the latest E2Guardian5 version from the repository in over 20 different locations. When I try to access a web page, it doesn't load at first, but it opens when I refresh the page. I don't encounter this error in Firefox. It only happens in Chrome and Edge browsers. During this time, an error line similar to "127.0.0.1 access denied net error" appears in the access logs. About a month ago, this issue suddenly started occurring in different locations with pfSense 2.4.5 and the previous version of E2Guardian installed. After upgrading all devices to 2.7.0 and the latest E2Guardian repository, the error started to occur less frequently. Sometimes, the page can't be displayed, but it refreshes itself within 1 second and opens, and again, the net error appears in the access logs.

@philipianpearce
Copy link
Contributor

@sehzade58 Thanks for this report, very helpful. Looks like something has changed in Chrome and Edge browsers. May be related to this bug (the time scale matches) but need to confirm. Can you post a small sample of the actual "127.0.0.1 access denied net error" messages?

@szrce Are your users using Chrome or Edge?

@szrce
Copy link
Author

szrce commented May 20, 2024

@sehzade58 Thanks for this report, very helpful. Looks like something has changed in Chrome and Edge browsers. May be related to this bug (the time scale matches) but need to confirm. Can you post a small sample of the actual "127.0.0.1 access denied net error" messages?

@szrce Are your users using Chrome or Edge?

yeap same chrome and edge here it is https://we.tl/t-vqUCw6aUKY pcap , client hello request exist but, dosent exist server response. its start 336,346 and, can you share your email address with me sezerceadres@gmail.com if possible

@sehzade58
Copy link

@philipianpearce

image

image

This screenshot contains exactly the error I'm talking about.

@szrce
Copy link
Author

szrce commented May 23, 2024

hi, @philipianpearce

i hope u are well, these are new output for the debug

example site: https://img7.mynet.com.tr/anasayfa/img/sprite.png?v=3 the chrome doesn't reach the page saying connection closed, same request copied and send with "postman" the result tls connection closed. e2guardian giving ouput has a img7.mynet... tcp start connection hello length is 4 or 1,6 its seen wrong,

look at from wireshark sni hello length 314,
e2guardiandebug4
e2guardiandebug5

but e2guardian side seen only 4
e2guardiandebug3

we cannot read correct buffer data,

when i change

toread = (buff[3] << (8 * 1) | buff[4]) + 5;

to
toread = (buff[3] << 8) | buff[4];
toread += 500;

its works fine everything, but not sure is correctly way?

@philipianpearce
Copy link
Contributor

philipianpearce commented May 24, 2024

Thanks for the trace.
I think this explains a lot.
To get toread == 4 then buff[4] must be -1. So buff[4] is being taken as signed char (-1) instead of unsigned char (255).
The default setting for char is strange, according to gcc it varies by platform!
Can you try adding -funsigned-char to the CXXFLAGS line in src/Makefile and re-compiling to see if that fixes it?

If it does, I will change configure.ac so that this always added as an option.

I've just posted a new v5.5.sni version where I have rewritten the SNI detection so that it is not reliant on bit-shifting etc and to detect if the ClientHello is ECH. Would you try this, but after you have tried existing code with -funsigned-char.

Thanks

@szrce
Copy link
Author

szrce commented May 24, 2024

Thanks for the trace. I think this explains a lot. To get toread == 4 then buff[4] must be -1. So buff[4] is being taken as signed char (-1) instead of unsigned char (255). The default setting for char is strange, according to gcc it varies by platform! Can you try adding -funsigned-char to the CXXFLAGS line in src/Makefile and re-compiling to see if that fixes it?

If it does, I will change configure.ac so that this always added as an option.

I've just posted a new v5.5.sni version where I have rewritten the SNI detection so that it is not reliant on bit-shifting etc and to detect if the ClientHello is ECH. Would you try this, but after you have tried existing code with -funsigned-char.

Thanks

its work with -funsigned-char without new commit but The following problem continues, these cause getting NETERROR logs and slow

e2guardiandns

14:03:29.990275 IP localhost.58658 > localhost.domain: 39049+ A? gum.cri^V^C^A^FM-W^A. (31)
14:03:25.349474 IP localhost.47809 > localhost.domain: 29785+ A? o^V^C^A^G^Z^A.home.arpa. (35)

if use both them(funsigned-char and new comm) same output connection closed, but connection is very fast other page. by the way when only get new commit its same working

@philipianpearce
Copy link
Contributor

Thanks for the testing, I'll add -funsigned-char to both the v5.5.5 and v5.5.sni branches.
Next week I will set up a test rig so that I can test this with Linux. We can then compare notes on this.

@szrce
Copy link
Author

szrce commented May 25, 2024

Thanks for the testing, I'll add -funsigned-char to both the v5.5.5 and v5.5.sni branches. Next week I will set up a test rig so that I can test this with Linux. We can then compare notes on this.

sounds good, thank you for focus, dont forget slowing(if you use params the page opening slowly), and without the param with new commits its so fast, bu still continue the problem

in summary
if only use params without new commit its the page opening slowly, but i never seen missing buffer reading. just broken request url maybe dns request cause url slowing not found.

otherwise
if you use both them(params and new commit) still same error output.

thanks
i waiting new response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants