Skip to content
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

Limit API access #38

Merged
merged 5 commits into from
Nov 14, 2024
Merged

Limit API access #38

merged 5 commits into from
Nov 14, 2024

Conversation

Ecnama
Copy link
Contributor

@Ecnama Ecnama commented Oct 25, 2024

Description

Forbids outside access to the API by binding Fastapi to the docker bridge IP.

Checklist

  • I have tested the changes locally and they work as expected.
  • I have tested the responsiveness of the changes and they work as expected.
  • I have assigned the pull request to the appropriate reviewer(s).
  • I have added labels to the pull request, if necessary.

@Ecnama Ecnama self-assigned this Oct 25, 2024
@Ecnama Ecnama linked an issue Oct 25, 2024 that may be closed by this pull request
netcontrol/fastapi_init.py Outdated Show resolved Hide resolved
Copy link
Member

@pixup1 pixup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use an nftable at launch to limit interaction to loaclhost addresses only. Scrap the bash script.

Copy link
Member

@pixup1 pixup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨✨ 🄻🅶🅃🅼 ✨✨

@Ecnama Ecnama merged commit eb217f3 into netcontrol Nov 14, 2024
4 checks passed
@Ecnama Ecnama deleted the netcontrol-access branch November 14, 2024 12:12
KwikKill pushed a commit that referenced this pull request Nov 21, 2024
* First attempt at limiting acces to fastapi

* Swith to bash

* Change to a nft rule

* Fix nft rule

* Clean netcontrol access rule

---------

Co-authored-by: Ecnama <[email protected]>
Co-authored-by: Claptrap <[email protected]>
KwikKill pushed a commit that referenced this pull request Nov 21, 2024
* First attempt at limiting acces to fastapi

* Swith to bash

* Change to a nft rule

* Fix nft rule

* Clean netcontrol access rule

---------

Co-authored-by: Ecnama <[email protected]>
Co-authored-by: Claptrap <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forbid outside API access
3 participants