Skip to content

Allow explicitly setting Source Hash Key#3204

Merged
AdSchellevis merged 1 commit intoopnsense:masterfrom
fredronnv:dev/sourcehashkey
Feb 8, 2019
Merged

Allow explicitly setting Source Hash Key#3204
AdSchellevis merged 1 commit intoopnsense:masterfrom
fredronnv:dev/sourcehashkey

Conversation

@fredronnv
Copy link
Contributor

This key is randomly assigned unless set every time the ruleset is
loaded. In order to make it persist, allow setting it to a predetermined
value.

This key is randomly assigned unless set every time the ruleset is
loaded. In order to make it persist, allow setting it to a predetermined
value.
@fredronnv
Copy link
Contributor Author

This most likely needs a bit of tidying, which I'm happy to do in case it seems like a worthwhile merge. It's at this stage mostly a quick proof of concept. Perhaps it has other impacts I'm not aware of?

@AdSchellevis
Copy link
Member

AdSchellevis commented Feb 8, 2019

@fredronnv what is the use-case for this?

@fredronnv
Copy link
Contributor Author

@fredronnv what is the use-case for this this?

When using a pool as NAT translation, in our case a /23, we like to have a predictable translation for clients, so a particular client will always be translated to the same external address, even if the ruleset is modified. Currently if you choose source-hash, pfctl will generate a random value as the source hash key every time the ruleset is loaded, which means that clients will not maintain their external address translation.

@AdSchellevis
Copy link
Member

sounds reasonable, let me look at this.

@AdSchellevis AdSchellevis merged commit 1e7b0d2 into opnsense:master Feb 8, 2019
AdSchellevis added a commit that referenced this pull request Feb 8, 2019
- strict page validation
- disable input's when hidden (generic page issue)
@AdSchellevis
Copy link
Member

@fredronnv thanks! did a small cleanup while there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants