-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Changed Postup and Postdown script to drop traffic between the peers. #362
Conversation
Added drop rules to drop the traffic between the peers, this is required for enhanced security.
Added a corresponding rule to clean up the peer drop traffic rule in the postdown script.
Hi @NOXCIS , do you mind look over this please? |
@donaldzou The iptables scripts are just defaults a user can modfiy to their needs. No need to implimnet someones specific use case. |
@mzs114 is this not like the rules |
Yes these are the same, as these were missing in the scripts. @NOXCIS There exists some preset rules, this is adding a new rule(and another one to remove). |
Hi @mzs114 is this not done with the new code? |
Not sure which code or version you are referring to? I mean these changes were not merged, so this is still pending? The reason for this PR is to include such rule in the given scripts. |
Can't users do it now with the PreUp, PreDown... Etc rules inside WGDashboard itself? |
No, that rules are missing, that is the reason for this PR. Please check the new additions in the diff. |
Hi @mzs114 I see your branch is still on version 4.0.2. And the main application or the Docker container no longer uses these iptable rules. Maybe we can put those rules into the documentation, but having them in Bash scripts is not optimal. @donaldzou what do you think? |
Just wondering... aren't Post/Pre script not identical? i.e is different for everybody? @DaanSelen it seems like a WireGuard related issue lol |
@donaldzou @DaanSelen Wireguard and iptables restrictions for multiple users For the love of god stop breaking shit. Iptable rules are the only way to apply peer routing to a Wireguard interface. Wireguard and iptables restrictions for multiple usersIf you don't know what Wireguard is, well, you should. AssumptionsThis should fit most setups (not mine though 😉)
Initial server setup
First admin clientLet's setup a client with full access to Internet and your LAN through Wireguard.
LAN only userLet's add a user who should only have access to the LAN.
Restrict the user to a portLet's re-use the user we previously created. Let's only allow him to access port 445 (Samba) on a server
Restrict the user to limited Web browsing onlyThat's useful for our friends who want to stream restricted content on Netflix without allowing them on your LAN 😉
More rulesFeel free to comment, I'll try my best to make you a rule 😉 Enjoy! |
Hey Noxcis, if we are breaking things please let me know what, so we/Donald can fix them. These rules are good rules. But please point me to the code that has a reference to it. Right now it looks just like a script that is not being used. I was thinking about moving this to the documentation, so people can forge their own Iptables rules based on this. Hopefully we can think of something together! And I do not wish to be argumentative, I just want to have reasons behind actions which we can all agree on. |
Yes, documentation too helps, we can suggest these rules. Basically help a non-docker user to bootstrap quickly with a working VPN setup that is having secure rules, I am yet to see how this change breaks anything, other than the intended use - Drop the traffic between peers. Personally, after going through the available approaches, I think that having a script is ok, as this can be a sane default for the operator to use in the I sent a PR for this script as this is where I found the rules stored and unused at that time, hence the branch drifted. |
This comment was marked as abuse.
This comment was marked as abuse.
Hi @NOXCIS, First, I want to express my gratitude for your contributions to this project. I'm truly thankful to everyone who has helped make it better. Building this project has been my own effort, done entirely as a hobby, with no external funding or compensation. The reason WGDashboard may have seemed stable for a long time is that it was initially very simple, with only a few features. Over time, I decided it was necessary to refactor the project using a newer tech stack. If there are imperfections, please feel free to hold me accountable. I’ll definitely look into the issues you mentioned. Thank you again for bringing them to my attention. In the future, if you're open to it, feel free to suggest any improvements. I welcome all feedback, and be nice, as I strive to treat everyone in this community with the same respect. Lastly, I want to give a shoutout to WireGate. Hope you have a great day. Best, |
@NOXCIS First off - I want to sincerely apologize for how I acted. By the way you made a spelling mistake, I love obfuscating though:
My response.
My vision for this has always been to help people get this to work quickly through Docker. And I do not like how our exchange went down. Regarding the useless code in the Docker container, you do have a point. My plan was always to remove more code as it becomes supported by WGDashboard itself. Like the start-on-boot feature has been removed. Most of the audience is not very known which deep technical concepts. That said, making this project is about working together. Not one person rules because he thinks he knows best. Anyone can challenge me in a discussion on my methods, and if they are right then we can change those things. You can do this as well, but removing someone's work will spark anger - so communicate with each other. @mzs114 I would love your input - if you can, would you like to join the Discord so we can talk pro-actively? |
Two new iptable rules were added, one to drop the traffic between the peers and another to clean this drop rule when the interface goes down.
Edit: These are required to enhance the security by avoiding the traffic between the peers.