HTTP ========= .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`High Level Protocol Setup ` * :ref:`Experimental Setup ` * :ref:`SW Info ` * :ref:`Application ` * :ref:`Libraries ` * :ref:`Steps ` * :ref:`Setup HTTP Proxy server on ubuntu ` * :ref:`Connecting HTTP Proxy server to client ` * :ref:`Squid Configuration ` * :ref:`Protocol ` * :ref:`Test Cases ` * :ref:`Frame Sequence ` * :ref:`Wireshark Capture ` * :ref:`Packets ` * :ref:`Packet 1 ` * :ref:`Packet 2 ` * :ref:`FAQs ` * :ref:`Reference links ` .. _HTTP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * HTTP .. _HTTP_step2: .. tab-set:: .. tab-item:: Terminology .. csv-table:: :file: ./terminology_info.csv :widths: 20,20,60 .. _HTTP_step3: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Ubuntu Ubuntu 22.04 64 bit Linux Kernel 6.5.0 =============================== ======================================= .. _HTTP_step4: .. tab-set:: .. tab-item:: High Level Protocol Setup * High Level Protocol Setup .. _HTTP_step5: .. tab-set:: .. tab-item:: Experimental Setup * Experimental Setup .. _HTTP_step6: .. tab-set:: .. tab-item:: SW .. _HTTP_step7: .. tab-set:: .. tab-item:: Application =============================== ====================== ============================================================================================ ======================================= Command Version Dependent Libraries Description =============================== ====================== ============================================================================================ ======================================= pwd coreutils 8.32 * linux-vdso.so.1 (0x00007ffd27d87000) Prints the current working directory. * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000791e18800000) * /lib64/ld-linux-x86-64.so.2 (0x0000791e18bc8000) apt 2.4.13 (amd64) * linux-vdso.so.1 (0x00007ffc9b68c000) Command-line interface for package management in Debian-based systems like Ubuntu.Provides easy access to installation,removal,and management of software packages. * libapt-private.so.0.0 => /lib/x86_64-linux-gnu/libapt-private. so.0.0 (0x00007a46ea99e000) * libapt-pkg.so.6.0 => /lib/x86_64-linux-gnu/libapt-pkg. so.6.0 (0x00007a46ea7d7000) * libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++. so.6 (0x00007a46ea400000) * libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s. so.1 (0x00007a46ea7b7000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007a46ea000000) * libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007a46ea799000) * libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2. so.1.0 (0x00007a46ea786000) * liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma. so.5 (0x00007a46ea75b000) * liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4. so.1 (0x00007a46ea73b000) * libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd. so.1 (0x00007a46ea66c000) * libudev.so.1 => /lib/x86_64-linux-gnu/libudev. so.1 (0x00007a46ea642000) * libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd. so.0 (0x00007a46ea339000) * libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt. so.20 (0x00007a46e9ec2000) * libxxhash.so.0 => /lib/x86_64-linux-gnu/libxxhash. so.0 (0x00007a46ea324000) * libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007a46ea23d000) * lib64/ld-linux-x86-64.so.2 (0x00007a46eaa24000) * libcap.so.2 => /lib/x86_64-linux-gnu/libcap. so.2 (0x00007a46ea635000) * libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error. so.0 (0x00007a46e9e9c000) squid 5.9 * linux-vdso.so.1 (0x00007ffe13d62000) The squid command starts the Squid proxy * libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x0000705211294000) server,which acts as a caching proxy to * libecap.so.3 => /lib/x86_64-linux-gnu/libecap.so.3 (0x0000705211289000) optimize web traffic.It supports protocols * libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x000070521081e000) like HTTP,HTTPS,and FTP,helping reduce * libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x0000705211258000) bandwidth usage,improve response times, * libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x0000705210633000) and control access to internet resources. * libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x0000705211204000) * libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x0000705210568000) * libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007052111fc000) * libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007052104a1000) * libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007052111f1000) * libnetfilter_conntrack.so.3 => /lib/x86_64-linux-gnu/libnetfilter_conntrack. so.3 (0x0000705210482000) * libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x00007052111e6000) * libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000705210200000) * libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000705210119000) * libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000705210462000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000070520fe00000) * libicuuc.so.70 => /lib/x86_64-linux-gnu/libicuuc.so.70 (0x000070520fc05000) * libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x0000705210446000) * liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007052100ee000) * libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x000070520faca000) * libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007052100cd000) * libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x000070520f920000) * libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x000070521042e000) * libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x0000705210085000) * libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x000070520f89e000) * /lib64/ld-linux-x86-64.so.2 (0x00007052112f4000) * libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x0000705210056000) * libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x0000705210048000) * libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007052111d9000) * libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x0000705210034000) * libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x000070520f7cf000) * liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x000070520f7af000) * libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x000070520f671000) * libnfnetlink.so.0 => /lib/x86_64-linux-gnu/libnfnetlink.so.0 (0x000070521002a000) * libmnl.so.0 => /lib/x86_64-linux-gnu/libmnl.so.0 (0x000070520f669000) * libicudata.so.70 => /lib/x86_64-linux-gnu/libicudata.so.70 (0x000070520da00000) * libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x000070520f65c000) * libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x000070520f636000) systemctl systemd 249 * linux-vdso.so.1 (0x00007ffe451c5000) It is used to control and manage systemd services and the system state on Linux.It allows you to start, stop, restart,enable, disable, and check the status of * libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x000073cdb339f000) services and system units. * libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x000073cdb3373000) * liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x000073cdb3348000) * liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x000073cdb3328000) * libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x000073cdb3259000) * libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x000073cdb3220000) * libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x000073cdb30e2000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000073cdb2e00000) * /lib64/ld-linux-x86-64.so.2 (0x000073cdb34d6000) * libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x000073cdb304b000) * libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x000073cdb2dda000) netstat net-tools * linux-vdso.so.1 (0x00007fffd5797000) It provides detailed information 2.10-alpha about network connections, routing tables, interface statistics, and network protocol usage on a computer or server. It is commonly used for network troubleshooting, monitoring, and diagnosing network-related issues. * libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x000071c6977bf000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000071c697400000) * libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x000071c697728000) * /lib64/ld-linux-x86-64.so.2 (0x000071c69782e000) curl 7.81.0 * linux-vdso.so.1 (0x00007ffc657e3000) curl (short for Client URL) is a command-line tool and library used for transferring data with URLs. It supports a wide range of protocols, such as HTTP, HTTPS, FTP, FTPS,SCP, SFTP, SMTP, IMAP, and more. It's commonly used for interacting with web services, testing APIs, and fetching data over the internet.It can be used to send requests to servers and retrieve responses, upload files, or interact with APIs for tasks such as authentication, file downloads, and much more. * libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x0000757ce59a0000) * libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x0000757ce5984000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000757ce5600000) * libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x0000757ce595a000) * libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x0000757ce5939000) * librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x0000757ce591a000) * libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x0000757ce58ab000) * libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x0000757ce5897000) * libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x0000757ce555c000) * libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x0000757ce5000000) * libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x0000757ce5843000) * libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 (0x0000757ce54fd000) * liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 (0x0000757ce5830000) * libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x0000757ce4f31000) * libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x0000757ce54ef000) * /lib64/ld-linux-x86-64.so.2 (0x0000757ce5aa2000) * libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x0000757ce4d87000) * libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x0000757ce4b9c000) * libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x0000757ce54a7000) * libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x0000757ce5461000) * libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x0000757ce4b1a000) * libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x0000757ce4a4f000) * libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x0000757ce4a20000) * libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x0000757ce545b000) * libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x0000757ce544d000) * libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x0000757ce4a05000) * libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon. so.1 (0x0000757ce49e2000) * libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x0000757ce48a7000) * libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x0000757ce488f000) * libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x0000757ce5446000) * libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x0000757ce487b000) * libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x0000757ce486e000) wget 1.21.2 * linux-vdso.so.1 (0x00007ffd37994000) wget is a command-line utility for downloading files from the web. It supports HTTP, HTTPS,and FTP protocols, and allows non-interactive downloads, resuming interrupted downloads,and recursive downloading of websites. It's commonly used for automating file transfers and mirroring websites. * libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x000075c81b207000) * libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x000075c81b1fe000) * libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x000075c81b1dd000) * libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x000075c81b139000) * libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x000075c81ac00000) * libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000075c81b11d000) * libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x000075c81b107000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000075c81a800000) * /lib64/ld-linux-x86-64.so.2 (0x000075c81b333000) * libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x000075c81aa56000) telnet 0.17-44build1 * linux-vdso.so.1 (0x00007ffe8015b000) It is used to connect to remote systems over * libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007e5684c00000) a network for testing and remote communication though it lacks encryption and * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007e5684800000) is less secure than SSH. * libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007e5684f2f000) * /lib64/ld-linux-x86-64.so.2 (0x00007e568504d000) * libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007e5684f0f000) ping iputils 20211215 * linux-vdso.so.1 (0x00007ffcaffd6000) It is used to check if a computer or server * libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007eda4a1ec000) is reachable over a network. It sends a small packet of data to the target and waits for a reply. If it gets a response, it means the target is online and reachable. * libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007eda4a1cb000) * libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007eda49e00000) * libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007eda49c56000) * /lib64/ld-linux-x86-64.so.2 (0x00007eda4a225000) =============================== ====================== ============================================================================================ ======================================= .. _HTTP_step8: .. tab-set:: .. tab-item:: Libraries ================================ ============================================= =========================== ===================================================================== Library Path Version Description ================================ ============================================= =========================== ===================================================================== linux-vdso.so.1 (virtual DSO - no path, provided by kernel) N/A Virtual dynamic shared object for system calls optimization (provided by kernel) libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 2.35 GNU C Library — core system functionality like memory allocation, I/O, etc. ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 2.35 Dynamic linker/loader — prepares and runs dynamic executables libapt-private.so.0.0 /lib/x86_64-linux-gnu/libapt-private.so.0.0 2.4.13 Internal library used by APT tools (Advanced Package Tool). libapt-pkg.so.6.0 /lib/x86_64-linux-gnu/libapt-pkg.so.6.0 2.4.13 Core library of APT, handling package management and retrieval. libstdc++.so.6 /lib/x86_64-linux-gnu/libstdc++.so.6 12.3.0-1ubuntu1~22.04 Standard C++ library for handling C++ programs and features. libgcc_s.so.1 /lib/x86_64-linux-gnu/libgcc_s.so.1 12.3.0-1ubuntu1~22.04 GCC low-level runtime library for exception handling. libz.so.1 /lib/x86_64-linux-gnu/libz.so.1 1:1.2.11.dfsg-2ubuntu9.2 Zlib compression library for file compression and decompression. libbz2.so.1.0 /lib/x86_64-linux-gnu/libbz2.so.1.0 1.0.8-5build1 Bzip2 compression library. liblzma.so.5 /lib/x86_64-linux-gnu/liblzma.so.5 5.2.5-2ubuntu1 XZ compression library. liblz4.so.1 /lib/x86_64-linux-gnu/liblz4.so.1 1.9.3-2build2 LZ4 compression library. libzstd.so.1 /lib/x86_64-linux-gnu/libzstd.so.1 1.4.8+dfsg-3build1 Zstandard compression library, for fast compression. libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.1 249.11-0ubuntu3.12 Library for interacting with the udev device manager. libsystemd.so.0 /lib/x86_64-linux-gnu/libsystemd.so.0 249.11-0ubuntu3.12 Systemd library for managing system services. libgcrypt.so.20 /lib/x86_64-linux-gnu/libgcrypt.so.20 1.9.4-3ubuntu3 Library for cryptographic algorithms. libxxhash.so.0 /lib/x86_64-linux-gnu/libxxhash.so.0 0.8.1-1 Library for fast, non-cryptographic hash function (XXHash). libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 2.35-0ubuntu3.9 Math library providing common mathematical functions. ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 2.35-0ubuntu3.9 The dynamic linker for ELF (Executable and Linkable Format) binaries. libcap.so.2 /lib/x86_64-linux-gnu/libcap.so.2 1:2.44-1ubuntu0.22.04.2 Library for handling POSIX capabilities. libgpg-error.so.0 /lib/x86_64-linux-gnu/libgpg-error.so.0 1.43-3 Library for handling errors related to GnuPG (Gnu Privacy Guard). libnettle.so.8 /lib/x86_64-linux-gnu/libnettle.so.8 3.7.3-1build2 Cryptographic library providing low-level cryptographic primitives. libecap.so.3 /lib/x86_64-linux-gnu/libecap.so.3 1.0.1-3.2ubuntu4 eCAP – content adaptation framework. libxml2.so.2 /lib/x86_64-linux-gnu/libxml2.so.2 2.9.13+dfsg-1ubuntu0.6 XML parsing library libexpat.so.1 /lib/x86_64-linux-gnu/libexpat.so.1 2.4.7-1ubuntu0.6 XML parser library written in C libgnutls.so.30 /lib/x86_64-linux-gnu/libgnutls.so.30 3.7.3-4ubuntu1.6 TLS and SSL protocols implementation libgssapi_krb5.so.2 /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 1.19.2-2ubuntu0.6 Kerberos 5 GSS-API library. libkrb5.so.3 /lib/x86_64-linux-gnu/libkrb5.so.3 1.19.2-2ubuntu0.6 Core Kerberos library. libcom_err.so.2 /lib/x86_64-linux-gnu/libcom_err.so.2 1.46.5-2ubuntu1.2 Common error description library. libsystemd.so.0 /lib/x86_64-linux-gnu/libsystemd.so.0 249.11-0ubuntu3.12 System and service manager. libcap.so.2 /lib/x86_64-linux-gnu/libcap.so.2 1:2.44-1ubuntu0.22.04.2 POSIX capabilities library libnetfilter_conntrack.so.3 /lib/x86_64-linux-gnu/ 1.0.9-1 Netfilter connection tracking library. libnetfilter_conntrack.so.3 libltdl.so.7 /lib/x86_64-linux-gnu/libltdl.so.7 2.4.6-15build2 Libtool dynamic module loader libicuuc.so.70 /lib/x86_64-linux-gnu/libicuuc.so.70 70.1-2 Unicode support library. libp11-kit.so.0 /lib/x86_64-linux-gnu/libp11-kit.so.0 0.24.0-6build1 PKCS#11 proxy library. libidn2.so.0 /lib/x86_64-linux-gnu/libidn2.so.0 2.3.2-2build1 Internationalized Domain Names library. libunistring.so.2 /lib/x86_64-linux-gnu/libunistring.so.2 1.0-1 Unicode string manipulation. libtasn1.so.6 /lib/x86_64-linux-gnu/libtasn1.so.6 4.18.0-4ubuntu0.1 ASN.1 parser library. libhogweed.so.6 /lib/x86_64-linux-gnu/libhogweed.so.6 3.7.3-1build2 Cryptographic library (used with Nettle). libgmp.so.10 /lib/x86_64-linux-gnu/libgmp.so.10 2:6.2.1+dfsg-3ubuntu1 Arithmetic on big numbers. ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 2.35-0ubuntu3.9 Loads and links programs libk5crypto.so.3 /lib/x86_64-linux-gnu/libk5crypto.so.3 1.19.2-2ubuntu0.6 Kerberos cryptographic library libkrb5support.so.0 /lib/x86_64-linux-gnu/libkrb5support.so.0 1.19.2-2ubuntu0.6 Support routines for Kerberos. libkeyutils.so.1 /lib/x86_64-linux-gnu/libkeyutils.so.1 1.6.1-2ubuntu3 Key management utilities. libresolv.so.2 /lib/x86_64-linux-gnu/libresolv.so.2 2.35-0ubuntu3.9 DNS resolver library. libnfnetlink.so.0 /lib/x86_64-linux-gnu/libnfnetlink.so.0 1.0.1-3build3 Netfilter communication library libmnl.so.0 /lib/x86_64-linux-gnu/libmnl.so.0 1.0.4-3build2 Minimalistic Netlink library libicudata.so.70 /lib/x86_64-linux-gnu/libicudata.so.70 70.1-2 International Components for Unicode. libffi.so.8 /lib/x86_64-linux-gnu/libffi.so.8 3.4.2-4 Foreign Function Interface library libselinux.so.1 /lib/x86_64-linux-gnu/libselinux.so.1 3.3-1build2 SELinux security policies support. libblkid.so.1 /lib/x86_64-linux-gnu/libblkid.so.1 2.37.2-4ubuntu3.4 Identifies block devices (partitions, file systems, etc.). libpcre2-8.so.0 /lib/x86_64-linux-gnu/libpcre2-8.so.0 10.39-3ubuntu0.1 Perl-compatible regular expression engine (PCRE2). libcurl.so.4 /lib/x86_64-linux-gnu/libcurl.so.4 7.81.0-1ubuntu1.20 Client-side URL transfer library supporting various protocols like HTTP, FTP, and more libnghttp2.so.14 /lib/x86_64-linux-gnu/libnghttp2.so.14 1.43.0-1ubuntu0.2 HTTP/2 C library implementing RFC 7540. libidn2.so.0 /lib/x86_64-linux-gnu/libidn2.so.0 2.3.2-2build1 Internationalized domain name (IDN) library. librtmp.so.1 /lib/x86_64-linux-gnu/librtmp.so.1 2.4+20151223. RTMP (Real-Time Messaging Protocol) client library. gitfa8646d.1-2build4 libssh.so.4 /lib/x86_64-linux-gnu/libssh.so.4 0.9.6-2ubuntu0.22.04.3 SSH (Secure Shell) protocol library. libpsl.so.5 /lib/x86_64-linux-gnu/libpsl.so.5 0.21.0-1.2build2 Public Suffix List library for domain name parsing. libssl.so.3 /lib/x86_64-linux-gnu/libssl.so.3 3.0.2-0ubuntu1.19 OpenSSL SSL/TLS cryptographic library. libldap-2.5.so.0 /lib/x86_64-linux-gnu/libldap-2.5.so.0 2.5.18+dfsg- 0ubuntu0.22.04.3 OpenLDAP libraries for Lightweight Directory Access Protocol (LDAP) servers and clients. liblber-2.5.so.0 /lib/x86_64-linux-gnu/liblber-2.5.so.0 2.5.18+dfsg-0ubuntu 0.22.04.3 OpenLDAP libraries for BER (Basic Encoding Rules) encoding/decoding. libbrotlidec.so.1 /lib/x86_64-linux-gnu/libbrotlidec.so.1 1.0.9-2build6 Brotli decompression library. libsasl2.so.2 /lib/x86_64-linux-gnu/libsasl2.so.2 2.1.27+dfsg2-3ubuntu1.2 Cyrus SASL (Simple Authentication and Security Layer) library. libbrotlicommon.so.1 /lib/x86_64-linux-gnu/libbrotlicommon.so.1 1.0.9-2build6 Brotli compression common library. libtasn1.so.6 /lib/x86_64-linux-gnu/libtasn1.so.6 4.18.0-4ubuntu0.1 ASN.1 (Abstract Syntax Notation One) library. libuuid.so.1 /lib/x86_64-linux-gnu/libuuid.so.1 2.37.2-4ubuntu3.4 Universally Unique Identifier (UUID) library ================================ ============================================= =========================== ===================================================================== .. _HTTP_step9: .. tab-set:: .. tab-item:: Steps .. _HTTP_step10: .. tab-set:: .. tab-item:: Setup HTTP Proxy server on Ubuntu. * Step-1 : Find the IP address of Ubuntu machine .. code-block:: shell test:~$ ifconfig docker0: flags=4099 mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:c2:a4:22:08 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp0s31f6: flags=4163 mtu 1500 inet 10.91.239.13 netmask 255.255.255.0 broadcast 10.91.239.13 inet6 fe80::bb87:2721:82b8:f6cd prefixlen 64 scopeid 0x20 ether e4:54:e8:4e:e4:b9 txqueuelen 1000 (Ethernet) RX packets 10426884 bytes 7818062595 (7.8 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3605750 bytes 434038103 (434.0 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0xdf000000-df020000 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 1097677 bytes 88297298 (88.2 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1097677 bytes 88297298 (88.2 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 * To find the IP address of your Ubuntu machine,use the ifconfig command. * From the output of ifconfig command,for example, 10.91.239.13 is used as the Proxy Server IP. * This Proxy server IP is used when connecting HTTP server to a client. * Step-2 : Install Squid Proxy Server on Ubuntu .. code-block:: shell test:~$ pwd /home/test test:~$ sudo apt update test:~$ sudo apt install squid * Step-3 : Verify the Installation .. code-block:: shell test:~$ squid -v * Step-4 : Edit the Squid Configuration file .. code-block:: shell test:~$ sudo nano /etc/squid/squid.conf #specify the port for squid to listen http_port 3128 #Define an ACL for the client (replace with your client's IP) acl client_ip src 192.168.0.37 #this could be the actual IP of the client #Allow the client IP to access the proxy http_acess allow client_ip acl safe_ports port 80 #Allow access to safe ports(which is just HTTP in this case) http_access allow safe_ports #Deny all other clients from accessing the proxy http_access deny all #Logging and cache settings (optional) access_log /var/log/squid/access.log cache_dir ufs /var/spool/squid 100 16 256 #default cache directory with 100MB space visible_hostname sysadmin //optional * NOTE : comment all the lines in file the above prompt only to save. ==================================================== ================================================================================================================== Configuration Statement Description ==================================================== ================================================================================================================== http_port 3128 Specifies the port on which Squid listens for incoming proxy requests. Default is port 3128. acl client_ip src 192.168.0.37 Defines an Access Control List (ACL) rule that allows access to the proxy for the client with IP 192.168.0.37. http_access allow client_ip Grants proxy access to the client defined in the client_ip ACL rule. acl safe_ports port 80 Defines port 80 (HTTP) as a "safe" port, which is allowed for access. http_access allow safe_ports Allows access to "safe" ports (e.g., HTTP port 80) as specified in the safe_ports ACL rule. http_access deny all Denies proxy access to all clients not explicitly allowed by the previous ACL rules. access_log /var/log/squid/access.log Specifies the location of Squid's access log file, where all proxy access attempts are recorded. cache_dir ufs /var/spool/squid 100 16 256 Defines the cache directory (/var/spool/squid) and configuration for storing cached data (100MB cache size). visible_hostname sysadmin Sets a human-readable hostname for the proxy server, useful for identification in logs and configuration files. ==================================================== ================================================================================================================== * Step-5 : Start the Squid server .. code-block:: shell test:~$ sudo systemctl restart squid test:~$ sudo systemctl enable squid IItest:~$ sudo systemctl status squid * NOTE : If server is not running,check logs at "sudo journalctl -u squid" or "sudo systemctl status squid" and fix the errors. * Step-6 : Allow connection from port 3128 (http port) .. code-block:: shell test:~$ sudo ufw allow 3128 * Step-7 : To check the server is listening on port .. code-block:: shell test:~$ sudo netstat -tuln | grep 3128 tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN tcp6 0 0 :::3128 :::* LISTEN .. _HTTP_step11: .. tab-set:: .. tab-item:: Connecting HTTP Proxy server to client * Step-1 : Find the IP address of Client machine. .. code-block:: shell test:~$ ifconfig enp3s0: flags=4099 mtu 1500 ether e4:54:e8:0a:f2:75 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 453840 bytes 299962936 (299.9 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 453840 bytes 299962936 (299.9 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp4s0: flags=4163 mtu 1500 inet 192.168.0.37 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fd8d:7bbc:1295:8:3e83:f574:906b:9b12 prefixlen 64 scopeid 0x0 inet6 fe80::efe6:fe58:4cd1:9a51 prefixlen 64 scopeid 0x20 inet6 fd8d:7bbc:1295:8:51a9:e8f4:66d6:3180 prefixlen 64 scopeid 0x0 ether c0:b5:d7:0b:ac:5b txqueuelen 1000 (Ethernet) RX packets 3476163 bytes 2223285532 (2.2 GB) RX errors 0 dropped 48920 overruns 0 frame 0 TX packets 450874 bytes 86312159 (86.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 * Step-2 : Using Curl .. code-block:: shell test:~$ curl --proxy http://10.91.239.13:3128 http://example.com * Expected output:The HTML source code of the webpage hosted at http://example.com * NOTE: 10.91.239.13 is the Proxy Server IP address referenced in the "Setup HTTP Proxy Server on Ubuntu" section above. * Step-3 : Using wget .. code-block:: shell test:~$ wget -e use_proxy=yes -e http_proxy=http://10.91.239.13:3128 http://example.com * Expected output:The HTML content of the webpage at http://example.com * NOTE: 10.91.239.13 is the Proxy Server IP address referenced in the "Setup HTTP Proxy Server on Ubuntu" section above. * Step-4 : Using Telnet .. code-block:: shell test:~$ telnet 10.91.239.13 3128 Trying 10.91.239.13... Connected to 10.91.239.13. Escape Character is '^]'. * If the connection fails,the output will be something like connection refused or unable to connect. * NOTE: 10.91.239.13 is the Proxy Server IP address referenced in the "Setup HTTP Proxy Server on Ubuntu" section above. * Step-5 : Using firefox 1.Open firefox preferences. * Open firefox on your machine. * In the top-right corner,click on the three horizontal lines(the hamburger menu). * Click on settings. 2.Access Proxy settings * Scroll down to the Network Settings Section. * Click the settings button next to Network Settings. 3.Configure the Proxy * A new window will appear with various options to configure the Proxy settings. * Select Manual Proxy Configuration. * HTTP Proxy: Enter the IP address of your proxy server (e.g., 10.91.239.13). * Port: Enter the Port number (e.g., 3128,the default squid port). * Click OK. * Then restart the firefox. 4.Then search on firefox,it loads the webpages in browser. 5.Check on terminal also .. code-block:: shell test:~$ firefox http://www.example.com * It load the webpage in browser. * Step-6 : Using Chrome 1.Open chrome on your machine. * In the top-right corner,click on the three dots. * click on settings. 2.Scroll down to the system in that click on open your computer proxy settings. 3.In that proxy tab to click the NetworkProxy ON and below the configuration select manual option. 4.And enter Proxy server's IP address and port number in the HTTP Proxy. 5.After that open the chrome and search http://google.com. 6.If the Proxy is setup correctly,it loads the webpages. * Step-7 : Using netcat .. code-block:: shell test:~$ nc -zv 10.91.239.13 3128 Connection to 10.91.239.13 3128 port [tcp/*] succeeded! * NOTE: 10.91.239.13 is the Proxy Server IP address referenced in the "Setup HTTP Proxy Server on Ubuntu" section above. * Step-8 : Using ping .. code-block:: shell test:~$ ping 10.91.239.13 PING 10.91.239.13 (10.91.239.13 56(84) bytes of data. 64 bytes from 10.91.239.13: icmp_seq=1 ttl=64 time=0.092 ms 64 bytes from 10.91.239.13: icmp_seq=2 ttl=64 time=0.036 ms 64 bytes from 10.91.239.13: icmp_seq=3 ttl=64 time=0.094 ms 64 bytes from 10.91.239.13: icmp_seq=4 ttl=64 time=0.105 ms 64 bytes from 10.91.239.13: icmp_seq=5 ttl=64 time=0.094 ms * NOTE: 10.91.239.13 is the Proxy Server IP address referenced in the "Setup HTTP Proxy Server on Ubuntu" section above. .. _HTTP_step20: .. tab-set:: .. tab-item:: Squid Configuration * squid .. _HTTP_step12: .. tab-set:: .. tab-item:: Protocol .. _HTTP_step21: .. tab-set:: .. tab-item:: Test Cases * Test Cases .. _HTTP_step13: .. tab-set:: .. tab-item:: Frame Sequence * Frame Sequence .. _HTTP_step14: .. tab-set:: .. tab-item:: Wireshark Capture * Wireshark Capture .. _HTTP_step15: .. tab-set:: .. tab-item:: Packets .. _HTTP_step16: .. tab-set:: .. tab-item:: packet 1 * packet 1 .. _HTTP_step17: .. tab-set:: .. tab-item:: packet 2 * packet 2 .. _HTTP_step18: .. tab-set:: .. tab-item:: FAQs * FAQs .. _HTTP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links