{"id":22018366,"url":"https://github.com/flavienbwk/ubuntu-vpn-killswitch","last_synced_at":"2026-04-29T22:02:10.127Z","repository":{"id":124243384,"uuid":"411043676","full_name":"flavienbwk/ubuntu-vpn-killswitch","owner":"flavienbwk","description":"Ubuntu configuration for implementing a killswitch when your VPN connection drops.","archived":false,"fork":false,"pushed_at":"2021-09-27T21:34:42.000Z","size":2,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T09:35:23.760Z","etag":null,"topics":["linux","security","ubuntu","vpn"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flavienbwk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-27T21:08:51.000Z","updated_at":"2024-06-26T23:13:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"820ead8f-a849-447d-abff-715c2fd6da48","html_url":"https://github.com/flavienbwk/ubuntu-vpn-killswitch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flavienbwk/ubuntu-vpn-killswitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fubuntu-vpn-killswitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fubuntu-vpn-killswitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fubuntu-vpn-killswitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fubuntu-vpn-killswitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flavienbwk","download_url":"https://codeload.github.com/flavienbwk/ubuntu-vpn-killswitch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fubuntu-vpn-killswitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32445555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","security","ubuntu","vpn"],"created_at":"2024-11-30T05:12:00.442Z","updated_at":"2026-04-29T22:02:10.100Z","avatar_url":"https://github.com/flavienbwk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ubuntu VPN killswitch\n\nUbuntu configuration for implementing a killswitch when your VPN connection drops.\n\n## Principle\n\nWhen connecting to a VPN through the NetworkManager, it can happen your VPN drops connection. If you don't implement a killswitch, your IP will be public for any new query. A killswitch allows blocking any connection to Internet if your VPN connection drops.\n\nYour computer uses a specific `tun0` interface when connecting to a VPN. \n\nThe principle behind the following scripts is simply to deny all connection except the one from `tun0` thanks to `ufw` (a firewall).\n\n## Install\n\n1. **Connect to your VPN** and check the interface used by your computer\n\n    It _should_ be `tun0` but we want to make sure :\n\n    ```bash\n    ip a | grep tun0\n    ```\n\n    If this commands return nothing, enter the `ip a` command and check which network interface your VPN uses.\n\n2. Installing firewall script\n\n    ```bash\n    git clone https://github.com/flavienbwk/ubuntu-vpn-killswitch \u0026\u0026 cd ubuntu-vpn-killswitch\n\n    sudo apt-get install ufw -y # Installing UFW\n\n    # Copy script files\n    cp firewall.sh ~/firewall.sh\n    cp unfirewall.sh ~/unfirewall.sh\n\n    # Enable firewall for VPN-connections only\n    # CONNECT TO YOUR VPN FIRST\n    sudo bash ~/firewall.sh\n\n    # Disable firewall to go back to regular connection\n    sudo bash ~/unfirewall.sh\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienbwk%2Fubuntu-vpn-killswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflavienbwk%2Fubuntu-vpn-killswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienbwk%2Fubuntu-vpn-killswitch/lists"}