Skip to content
Discussion options

You must be logged in to vote

After one and a half year, I come back with a working setup.

wg0.conf:

Address = 10.6.1.1/24
PostUp = iptables -A FORWARD -i tun0 -o %i -m state --state RELATED,ESTABLISHED -j ACCEPT
PostUp = iptables -A FORWARD -i %i -o tun0 -j ACCEPT
PostUp = iptables -A PREROUTING -t mangle -s 10.6.1.0/24 -j MARK --set-mark 555
PostUp = iptables -t nat -A POSTROUTING -s 10.6.1.0/24 -j SNAT --to-source 10.255.0.1
PostDown = iptables -D FORWARD -i tun0 -o %i -m state --state RELATED,ESTABLISHED -j ACCEPT
PostDown = iptables -D FORWARD -i %i -o tun0 -j ACCEPT
PostDown = iptables -D PREROUTING -t mangle -s 10.6.1.0/24 -j MARK --set-mark 555
PostDown = iptables -t nat -D POSTROUTING -s 10.6.1.0/24 -j SNAT -…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zonyitoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant