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

PostUp Script truncated #655

Open
lfstuttgart opened this issue Dec 18, 2024 · 0 comments
Open

PostUp Script truncated #655

lfstuttgart opened this issue Dec 18, 2024 · 0 comments

Comments

@lfstuttgart
Copy link

Situation

The PostUp Script gets truncated - probably while it is written to wireguard-ui's database

This results in the following error during Wireguard startup:

Dec 18 06:07:02 wireguard wg-quick[133303]: [#] nft add table ip filter; nft add chain ip filter forward { type filter hook forward priority 0 \; }; nft add rule ip fil> Dec 18 06:07:02 wireguard wg-quick[133366]: Error: syntax error, unexpected newline Dec 18 06:07:02 wireguard wg-quick[133366]: add rule ip filter forward iif Dec 18 06:07:02 wireguard wg-quick[133366]: ^ Dec 18 06:07:02 wireguard wg-quick[133303]: [#] ip link delete dev wg0

Our PostUp Script
nft add table ip filter; nft add chain ip filter forward { type filter hook forward priority 0 \; }; nft add rule ip filter forward iif "wg0" accept; nft add table ip nat; nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; }; nft add rule ip nat postrouting oif "eth0" masquerade

Reproduce

  1. in Wireguard-UI go to Wireguard Server page page a longer PostUp Script like the above and click Save.
  2. Go to another page - for example Wireguard Clients.
  3. Go back to Wireguard Server page
  4. Click Apply Config

If your check the config file for on the server now, the PostUp script is truncated.

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