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

migrate sophisticated VPN setup #206

Open
realies opened this issue Dec 12, 2023 · 0 comments
Open

migrate sophisticated VPN setup #206

realies opened this issue Dec 12, 2023 · 0 comments

Comments

@realies
Copy link

realies commented Dec 12, 2023

I have a VPN setup, which requires me to instruct how traffic should be routed.

It won't work immediately by bringing the WireGuard interface, and the server can't be configured to do the routing there.

I'm trying to migrate this script to a split-vpn setup, but I'm not sure if it is even possible at all.

This is how it currently works:

wg-quick up ~/marla.conf

ip a add 123.123.123.123/32 dev lo
ip r add default dev marla table krok
ip r add 172.0.0.2/30 dev marla table krok
ip rule add iif lo from 123.123.123.123 table krok
ip rule add from 123.123.123.123 table krok

# br0 going out of the VPN and not through WAN
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o marla -j SNAT --to-source 123.123.123.123
iptables -A FORWARD -i br0 -o ppp0 -j DROP
iptables -A FORWARD -i marla -o br0 -m state --state RELATED,ESTABLISHED -j ACCEPT
ip rule add iif br0 table krok

Any help would be greatly appreciated.

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

No branches or pull requests

1 participant