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

How to use fw-rules.sh? #11

Closed
PennyLook opened this issue Aug 23, 2023 · 1 comment
Closed

How to use fw-rules.sh? #11

PennyLook opened this issue Aug 23, 2023 · 1 comment
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@PennyLook
Copy link

Hello,
I could not find information anywhere regarding the configuration of fw-rules.sh ~/openvpn/fw-rules.sh

how can I configure this so that clients do not have contact with each other and at the same time have access to the Internet?

Some example was described here

But I don't know if there is something I need to do on the client side, and whether it is the same running this script?

I think that, it's strange to add iptables on the OpenVPN server, because I can't access openvpn clients from the server.

@d3vilh
Copy link
Owner

d3vilh commented Aug 24, 2023

Hi Penny,
The ~/openvpn/fw-rules.sh will be executed with container start, so it can have regular iptables chains/commands like in example following by link:

iptables -A FORWARD -s 10.0.70.88 -d 10.0.70.77 -j DROP
iptables -A FORWARD -d 10.0.70.77 -s 10.0.70.88 -j DROP

This lines isolate traffic exchange from 10.0.70.88 to 10.0.70.77 and vice versa, so both clients will still have full access to the subnets except the fact they can't see each other when connected.

You can include literally anything in this file, any linux commands and even write a small script, so it will run when container starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants