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

Can't get server to client network routing to work... #6

Open
KlaysDe opened this issue Nov 26, 2023 · 1 comment
Open

Can't get server to client network routing to work... #6

KlaysDe opened this issue Nov 26, 2023 · 1 comment

Comments

@KlaysDe
Copy link

KlaysDe commented Nov 26, 2023

Hey, thanks for the awesome tutorial..
I seem to have trouble getting the whole setup to work.

My Setup consist of a VPS @ OVH, and a local box that i use for running docker containers, running ubuntu.
From what I observe, that the ping packet i'm sending does not leave the docker machine back to the wireguard server.

(Small clarification: ens18 and enp0s18 are the same interface, I had some inconsistencies in my screenshots regaring that)

I have done some packet tracing and here are the results:
pk9Q5
LORDN

Wireguard config on docker01

[Interface]
PrivateKey = <****************************************>
Address = 10.200.1.4/24
DNS = 1.1.1.1, 1.0.0.1

PostUp = iptables -A FORWARD -i %i -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o ens18 -j MASQUERADE

PreDown = iptables -D FORWARD -i %i -j ACCEPT
PreDown = iptables -t nat -D POSTROUTING -o enp0s18 -j MASQUERADE

[Peer]
PublicKey = <****************************************>
AllowedIPs = 0.0.0.0/0, ::0
Endpoint = <**********>:<***>
PersistentKeepalive = 25

Wireguard config on vpn-server

[Interface]
Address = 10.200.1.1/24
SaveConfig = false

PostUp = iptables -A FORWARD -i %i -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE

PreDown = iptables -D FORWARD -i %i -j ACCEPT
PreDown = iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE

ListenPort = 51820
PrivateKey = <****************************************>

[Peer]
# Some client that shall later be able to reach 192.168.178.36 / desktop
PublicKey = <****************************************>
AllowedIPs = 10.200.1.2/32

[Peer]
# docker01
PublicKey = <****************************************>
AllowedIPs = 10.200.1.4/32, 192.168.178.0/24

Can someone help and point out what i am missing here? Do the firewall rules of docker maybe interference with the setup?

@petter1
Copy link

petter1 commented Apr 26, 2024

In the docker01 config is one internal called once enp0s18 and once ens18. In your plan is ens18.

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

2 participants