Skip to content

Instantly share code, notes, and snippets.

@information-security
Created November 4, 2022 08:18
Show Gist options
  • Select an option

  • Save information-security/9332e1af69ed1325349c5df203c86cf8 to your computer and use it in GitHub Desktop.

Select an option

Save information-security/9332e1af69ed1325349c5df203c86cf8 to your computer and use it in GitHub Desktop.

Revisions

  1. information-security created this gist Nov 4, 2022.
    22 changes: 22 additions & 0 deletions Readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Assumption
    We assume that a VPN connection is already setup and a `ppp0` interface is up and running.

    # Routing modifications
    Run following commands as `root` user:
    ```shell
    cd /etc/iproute2
    cp rt_tables rt_tables.orig

    echo "1 vpn" >> /etc/iproute2/rt_tables

    ip route add default dev ppp0 table vpn

    ip rule add to 44.205.64.0/24 table vpn #Docker
    ip rule add to 34.205.13.0/24 table vpn # Docker
    ip rule add to 3.216.34.0/24 table vpn # Docker
    ip rule add to 138.197.224.240 table vpn # dist.libuv.org
    ```

    Top 3 IP ranges of the above examples are for `Docker` to pull images through VPN connection. `Docker Hub` is hosted on AWS therefore these IPs might change frequently.

    - Please note that these changes are not persistent and will be lost upon system reboot.