Skip to content

add option to not configure nat #187

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

Merged
merged 2 commits into from
Dec 22, 2024
Merged

Conversation

manuelschneider
Copy link
Contributor

Hi!

First: Thank you so much for all the hours you've spared me setting ovpn up :)

Personally I believe it makes sense, not to NAT outgoing VPN traffic, in order to distinguish different clients, for example in service logs. Thus, a proposal to consider.

Thanks,
Manuel

@Sispheor
Copy link
Contributor

This PR is actually useful.
On my side the default nat config is not working. I need to forward the trafic from one interface to another.
Like this:

# *nat
# :POSTROUTING ACCEPT [0:0]
# -A POSTROUTING -s 30.255.16.0/24 -j MASQUERADE -o ens224
# COMMIT

The default config is based on the ipv4 address

-A POSTROUTING -s {{ openvpn_server_network }}/24 -j SNAT --to-source {{ ansible_default_ipv4.address }}

@Sispheor
Copy link
Contributor

This PR only handle iptables. It should be placed into firewalld and ufw as well.

@kyl191 kyl191 merged commit 09aeb80 into kyl191:master Dec 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants