Repository navigation
feat: Add firewall support to prevent local network access #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tolbrino
wants to merge
12
commits into
main
Choose a base branch
from
tb/202610-firewall
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6835b93
feat: Prevent local network access
tolbrino 5f8c8c6
feat: Fix minor bugs
tolbrino 5da9f24
feat: Simplify docs
tolbrino 1a53ce0
feat: Add blocklist and shaping supporT
tolbrino e85cd48
feat: Fix some feedback
tolbrino e5bbf96
Update UPSTREAM_VERSION to 5.0.2
Jaguaras 3031340
Update UPSTREAM_VERSION in docker-compose.yml
Jaguaras c9f59d5
Change hoprd image path with PIX
Jaguaras aa89107
Update UPSTREAM_VERSION in docker-compose.yml
Jaguaras 1e430a4
Update UPSTREAM_VERSION in docker-compose.yml
Jaguaras 4616010
Update UPSTREAM_VERSION in docker-compose.yml
Jaguaras 2b3972d
Update UPSTREAM_VERSION to 5.0.2-pr.232
Jaguaras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,20 @@ | ||
| FROM europe-west3-docker.pkg.dev/gnosisvpn-production/docker-images/gnosis_vpn-server:0.7.0@sha256:443c4264bb41a82526ea7d227676f5060633e489569b4fb7fe6299f6a28ff78d | ||
|
|
||
| # The base image (Alpine) ships wg/wg-quick/ip but not iptables/ipset, which the PostUp/PreDown | ||
| # rules in wggvpn.conf.tpl need (ported from the gnosisvpn-server Ansible role). | ||
| RUN apk add --no-cache iptables ip6tables ipset bash | ||
| # The scripts need bash, iproute2 (ip, tc), iptables and ipset, and the blocklist | ||
| # refresher needs curl. Install them explicitly instead of relying on the base image | ||
| # (Alpine); apk skips any that are already installed. | ||
| RUN apk add --no-cache bash iproute2 iptables ipset curl | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Replace the image's own config.toml/wggvpn.conf with our templated versions. entrypoint.sh | ||
| # renders these and execs gnosis_vpn-server directly (not via the image's own wrapper.sh, | ||
| # which would leave it as a child process instead of PID 1 - see entrypoint.sh for why that | ||
| # matters for shutdown). | ||
| # matters for shutdown). PostUp/PreDown in wggvpn.conf run wg-hooks.sh, the forwarding | ||
| # policy - see README's "Firewall" section. wg-hooks.sh runs gvpn-peer-shaping.sh, and | ||
| # entrypoint.sh runs gvpn-blocklist-update.sh. | ||
| COPY config.toml.tpl wggvpn.conf.tpl ./ | ||
| COPY entrypoint.sh ./entrypoint.sh | ||
| RUN chmod +x ./entrypoint.sh | ||
| COPY entrypoint.sh wg-hooks.sh gvpn-blocklist-update.sh gvpn-peer-shaping.sh ./ | ||
| RUN chmod +x ./entrypoint.sh ./wg-hooks.sh ./gvpn-blocklist-update.sh ./gvpn-peer-shaping.sh | ||
|
|
||
| ENTRYPOINT ["/app/entrypoint.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my previous comment, I still think that there are too many similarities that it's worth to join both efforts into one place and make it configurable.