Examples

Forward Proxy Ip Acl

Forward proxy with no destination allowlist: any destination other than a private or reserved address is reachable, and egress control rests on the ip_acl filter gating which clients may open tunnels

Praxis Development (b102332f8bdc) 2 min read

Switching projects opens that project’s default documentation release.

Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.

Category: Practical
Task: Forward proxy with no destination allowlist: any destination other than a private or reserved address is reachable, and egress control rests on the ip_acl filter gating which clients may open tunnels

Prerequisites: The product runtime and any backend services referenced by this configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

# Forward Proxy (Client ACL)
#
# Forward proxy with no destination allowlist: any destination other than a
# private or reserved address is reachable, and egress control rests on the
# ip_acl filter gating which clients may open tunnels. Validation refuses an
# enabled forward_proxy that has neither allow_destinations nor an
# unconditional ip_acl/policy filter, but it checks that such a filter is
# present, not that it restricts anything: an ip_acl with no allow or deny
# entries admits every client, so keep the allow list narrow. Private and
# reserved destination addresses stay unreachable unless
# insecure_options.allow_private_upstreams is set.
#
#   Client 10.1.2.3 -- CONNECT any.host:443 --> Praxis :8080 --> any.host:443
#   Client 192.0.2.9 -- CONNECT any.host:443 --> Praxis :8080 --> 403
#
# Requires the experimental `forward-proxy` cargo feature.
#
# Usage:
#   cargo run -p praxis-proxy --features forward-proxy -- \
#     -c examples/configs/security/forward-proxy-ip-acl.yaml
#
# Exercise:
#   HTTPS_PROXY=http://127.0.0.1:8080 curl https://www.example.com/

listeners:
  - name: egress
    address: "127.0.0.1:8080"
    filter_chains: [egress]
    forward_proxy:
      enabled: true

filter_chains:
  - name: egress
    filters:
      # Only these client networks may open tunnels.
      - filter: ip_acl
        allow:
          - "127.0.0.0/8"
          - "10.0.0.0/8"
      - filter: access_log