-
Notifications
You must be signed in to change notification settings - Fork 0
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
iprules.sh into netcontrol #35
base: netcontrol
Are you sure you want to change the base?
Conversation
It would be better if iprules methods were in their own separate class (and file), as they don't really have anything to do with nftables |
netcontrol/nft.py
Outdated
vpn (str): VPN routing table name | ||
""" | ||
try: | ||
self._execute_nft_cmd(f"add rule insalan netcontrol-forward fwmark {mark} lookup {vpn}") |
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.
iprules aren't managed byt nft
but by ip rule
(cf iprules.sh
)
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.
ohh okay, i clearly misunderstood the assignment 😂
maybe the file should be elsewhere ? |
Do you mean outside of netcontrol ? I think it's fine there |
You also need to add the rules on api start and remove them on api stop. Use the lifetime() function from main.py for that (It's not up to date on your branch, do a |
Ne marche pas (les commandes ip rules sont executés dans le conteneur) |
7b71b36
to
1abb5bc
Compare
Description
iprules.sh
functions are converted to netcontrol functionsChecklist
Related Issues
Closes #31