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

wgeasy - How to change WG_DEVICE? #17

Open
snipah opened this issue Oct 15, 2023 · 4 comments
Open

wgeasy - How to change WG_DEVICE? #17

snipah opened this issue Oct 15, 2023 · 4 comments

Comments

@snipah
Copy link

snipah commented Oct 15, 2023

The original docker is using WG_DEVICE to configure the network device. My host machine is using eno1 as network device which works great for my current wg-setup.

Address = 172.16.3.1/24
SaveConfig = true
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eno1 -j MASQUERADE
ListenPort = 51820

Your add-on is not working for me, as no data is incoming. I assume, the network-device is the problem. Home Assistant also uses eno1 as network device according to the settings shown in setting/ system/network.

@jdeath
Copy link
Owner

jdeath commented Oct 15, 2023

Mine works fine on homeassitant, use it all the time. I do not use a POST-UP/POST-DOWN, just the default. Try that first.

If you refresh the addon store, and re-install the addon, the WG_DEVICE can be set.

@snipah
Copy link
Author

snipah commented Oct 15, 2023

Already tried all I could think of and of course left post-up and -down default.

@jdeath
Copy link
Owner

jdeath commented Oct 15, 2023

ok. If you refresh the addon store, and re-install the addon, the WG_DEVICE can be set.

@snipah
Copy link
Author

snipah commented Oct 15, 2023

Thanks! Tried it, but it still did not work. Will have to look into it later.

I think, the pre-up kept the eth0, even though I deleted all the files.

iptables -t nat -A POSTROUTING -s 172.16.3.0/24 -o eth0 -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT;

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