🌟 Elevate Network Safety with Gatesentry! A powerful Proxy & DNS server combo, adept at blocking harmful content. Ensure a secure and focused online space for kids and adults alike. Dive into a world of enhanced security and productivity now! #SecureNetwork #FocusedBrowsing
Find a file
2026-01-31 21:16:34 +01:00
.claude release 1.20.3 2026-01-31 18:39:13 +01:00
.github Merge pull request #110 from fifthsegment/codex/make-dns-resolver-configurable 2026-01-26 19:46:27 +01:00
.vscode disabling https mitm by default2 2023-10-02 22:58:27 +02:00
application Add rule-based filtering system with domain-specific controls 2026-01-26 21:24:14 +01:00
categories update picture in ui 2023-10-11 20:16:59 +02:00
filterfiles update filters + add category database 2023-10-11 08:12:43 +02:00
gatesentryproxy update 2026-01-31 21:10:18 +01:00
scripts update installer windows 2023-10-10 20:31:57 +02:00
tests add some new tests 2025-12-05 21:57:17 +00:00
ui Update rule-based filtering with domain blocking and UI improvements 2026-01-26 22:32:20 +01:00
website First draft 2023-10-02 20:40:17 +02:00
.gitignore Add automated PR binary builds with GitHub Actions 2025-11-24 13:46:39 +00:00
auth_filters_test.go add some new tests 2025-12-05 21:57:17 +00:00
bitbucket-pipelines.yml First draft 2023-10-02 20:40:17 +02:00
build.sh First draft 2023-10-02 20:40:17 +02:00
CHANGELOG.md Merge branch 'master' into release-v1206 2026-01-31 21:00:39 +01:00
coverage.txt add keyword block test 2023-10-21 00:29:20 +02:00
docker-compose.yml update docker-compose file 2023-10-22 21:26:51 +02:00
go.mod Update Go module dependencies 2025-11-24 13:00:39 +00:00
go.sum Update Go module dependencies 2025-11-24 13:00:39 +00:00
go.work Update Go module dependencies 2025-11-24 13:00:39 +00:00
go.work.sum Update Go module dependencies 2025-11-24 13:00:39 +00:00
LICENSE Create LICENSE 2023-10-03 23:24:10 +02:00
main.go release 1.20.6 2026-01-31 20:59:26 +01:00
main_test.go add some new tests 2025-12-05 21:57:17 +00:00
Makefile add some new tests 2025-12-05 21:57:17 +00:00
README-legacy.md First draft 2023-10-02 20:40:17 +02:00
README.md release minor 2026-01-30 22:51:27 +01:00
ROUTER_OPTIMIZATION.md Add environment variable configuration for low-spec hardware 2025-11-24 12:55:34 +00:00
run.sh update command in docker 2023-10-22 19:26:51 +02:00
setup_test.go add some new tests 2025-12-05 21:57:17 +00:00

Gatesentry

An open source proxy server (supports SSL filtering / MITM) + DNS Server with a nice frontend.

Codecov

Download the latest release

Usages:

  • Privacy Protection: Users can use Gatesentry to prevent tracking by various online services by blocking tracking scripts and cookies.

  • Parental Controls: Parents can configure Gatesentry to block inappropriate content or websites for younger users on the network.

  • Bandwidth Management: By blocking unnecessary content like ads or heavy scripts, users can save on bandwidth, which is especially useful for limited data plans.

  • Enhanced Security: Gatesentry can be used to block known malicious websites or phishing domains, adding an extra layer of security to the network.

  • Access Control: In a corporate or institutional setting, Gatesentry can be used to restrict access to non-work-related sites during work hours.

  • Logging and Monitoring: Track and monitor all the requests made in the network to keep an eye on suspicious activities or to analyze network usage patterns.

  • Custom Redirects (via DNS): Redirect specific URLs to other addresses, useful for local development or for redirecting deprecated domains.

gatesentry-repo

Getting started

There are 2 ways to run Gatesentry, either using the docker image or using the single file binary directly.

Method 1: Using Docker

  1. Use the docker-compose.yml file from the root of this repo as a template, copy and paste it to any directory on your computer, then run the following command in a terminal docker compose up

Method 2: Using the Gatesentry binary directly

  1. Downloading Gatesentry:

    Navigate to the 'Releases' section of this repository. Identify and download the appropriate file for your operating system, named either gatesentry-linux or gatesentry-mac.

  2. Installation:

    For macOS and Linux:

    Locate the downloaded Gatesentry binary file in your system. Open a terminal window and navigate to the directory containing the downloaded binary. Run the following command to grant execution permissions to the binary file:

    chmod +x gatesentry-{platform}
    

    Replace {platform} with your operating system (linux or mac). Proceed to execute the binary file to initiate the server.

    Running as a Service (Optional)

    If you want Gatesentry to keep running in the background on your machine, install it as :

    ./gatesentry-{platform} -service install

    Next, on linux you can use your system service runner to start or stop it, for example for ubuntu:

    service gatesentry start #starts the service

    service gatesentry stop #stops the service

    For Windows

    The installer (GatesentrySetup.exe) contains instructions.

    Running as a Service

    The installer (GatesentrySetup.exe) should automatically install a service. You can look for it by searching for gatesentry in your Service manager (open it by running services.msc)

  3. Launching the Server:

    Execute the Gatesentry binary file to start the server. Upon successful launch, the server will begin listening for incoming connections on port 10413.

Important information

Ports

By default Gatesentry uses the following ports

Port Purpose
10413 For proxy (explicit mode)
10414 For proxy (transparent mode, optional)
10786 For the web based administration panel
53 For the built-in DNS server
80 For the built-in webserver (showing DNS block pages)

Accessing the User Interface:

Open a modern web browser of your choice. Enter the following URL in the address bar: http://localhost:10786 The Gatesentry User Interface will load, providing access to various functionalities and settings.

Default Login Credentials:

Username: admin
Password: admin

Use the above credentials to log in to the Gatesentry system for the first time. For security reasons, it is highly recommended to change the default password after the initial login.

Note:Ensure your systems firewall and security settings allow traffic on ports 10413 and 10786 to ensure seamless operation and access to the Gatesentry server and user interface.

This guide now specifically refers to the Gatesentry software and uses the gatesentry-{platform} filename convention for clarity.

DNS Information

Gatesentry ships with a built in DNS server which can be used to block domains.
The resolver used for forwarding requests can now be configured via the application settings ("dns_resolver"). It defaults to Google DNS (8.8.8.8:53).

Transparent Proxy Mode (Linux only)

GateSentry automatically enables transparent proxy mode on Linux systems. This allows traffic interception without client configuration using Linux's SO_ORIGINAL_DST socket option and IP_TRANSPARENT socket support for TPROXY.

Setup for Local Traffic (REDIRECT mode)

For traffic originating from the local machine:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 10414
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 10414

Setup for Forwarded Traffic (TPROXY mode)

For traffic forwarded through the machine (e.g., Tailscale exit node, router):

# Mark traffic for routing
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 10414
iptables -t mangle -A PREROUTING -p tcp --dport 443 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 10414

# Route marked traffic locally
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100

Configuration

Variable Description Default
GS_TRANSPARENT_PROXY_PORT Port for transparent proxy 10414
GS_TRANSPARENT_PROXY Set to false to disable true on Linux

Requirements

  • Linux with SO_ORIGINAL_DST and IP_TRANSPARENT support
  • Root or CAP_NET_ADMIN privileges
  • CA certificate installed on clients for HTTPS interception

Features

  • Supports both REDIRECT (local) and TPROXY (forwarded) traffic
  • Auto-starts on Linux with graceful fallback
  • Protocol auto-detection (HTTP vs HTTPS)
  • SSL Bump support for HTTPS filtering
  • All existing filters work in transparent mode

Local Development

./setup.sh

To run it:

./run.sh