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

19.1.1 Alias doesn't show up when created by new entry #3215

Closed
chrismarkovic opened this Issue Feb 10, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@chrismarkovic
Copy link

chrismarkovic commented Feb 10, 2019

When using the alias_util api endpoint to add an entry for a new Alias, the Alias does not display in the gui Alias view. The created aliases do appear under the alias_util gui endpoint and entries can be manipulated there but they are not assignable to rules nor can they be deleted.

alias_util ui:
image

alias ui:
image

@AdSchellevis

This comment has been minimized.

Copy link
Member

AdSchellevis commented Feb 10, 2019

oops, you added a new one using the alias_util? it shouldn't do that, it doesn't know which type to create either.

@chrismarkovic

This comment has been minimized.

Copy link
Author

chrismarkovic commented Feb 10, 2019

facepalm That would be the reason ;)
Is there a proper method via API for creating and deleting the blank Aliases?

@AdSchellevis

This comment has been minimized.

Copy link
Member

AdSchellevis commented Feb 10, 2019

yes, the other endpoints, in the alias menu.

@chrismarkovic

This comment has been minimized.

Copy link
Author

chrismarkovic commented Feb 10, 2019

I'm sorry to ask, but I would assume I could use the getAliasUUID, use that uuid in the delItem to remove the "orphaned ones", but they do not appear to have a UUID. They don't return anything, whereas normal ones do. Any idea on the best way to delete them?

@AdSchellevis

This comment has been minimized.

Copy link
Member

AdSchellevis commented Feb 10, 2019

no problem, you mean the ones created alias_util? you could leave them or remove them from the console.

There's a script available, we don't seem to use it anymore (I think we had a button for this some time ago, but in normal situations this shouldn't be needed):

 /usr/local/opnsense/scripts/filter/kill_table.py myalias

Will likely do the trick

@AdSchellevis AdSchellevis self-assigned this Feb 10, 2019

fichtner added a commit that referenced this issue Feb 11, 2019

Firewall/alias, prevent new alias creation when adding an address in …
…addAction, `pfctl -T add` will automatically create a new alias when not found, which leads to confusing behaviour.

There is a small side effect, aliases not created by the user can not be appended anymore (bogons), but since these are system managed it's likely a small price to pay for clarity.

Closes #3215

(cherry picked from commit 0cb7758)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment