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

rich masquerading: it works #10

Closed
kiorky opened this issue May 11, 2015 · 6 comments
Closed

rich masquerading: it works #10

kiorky opened this issue May 11, 2015 · 6 comments

Comments

@kiorky
Copy link
Contributor

kiorky commented May 11, 2015

Just if i forget to catch you, @t-woerner

Using

firewall-cmd --add-rich-rule='rule family="ipv4" masquerade source address="10.5.0.0/16" destination not address="10.5.0.0/16"'

Will ensure following changes in the tables

NAT:
+-A POST_public_allow -s 10.5.0.0/16 ! -d 10.5.0.0/16 -j MASQUERADE
FILTER:
+-A FWDO_public_allow ! -s 10.5.0.0/16 -d 10.5.0.0/16 -j ACCEPT

Im inspecting what the second rule grants really, but it seems fine.

@kiorky
Copy link
Contributor Author

kiorky commented May 11, 2015

Im wondering if the second rules is not mising --state RELATED,ESTABLISHED

@t-woerner
Copy link
Collaborator

The conntrack match for established and related is there already in the FORWARD chain and therefore not needed here. But it is lacking an additional "-m conntrack --ctstate NEW".

I will push a new patch for verification.

@t-woerner
Copy link
Collaborator

But on the other hand INVALID is also dropped early in the FORWARD chain (since 354dcab again), therefore the rule can only be hit by connections that are in NEW state.

@t-woerner
Copy link
Collaborator

Fixed in 36ccd63

@kiorky
Copy link
Contributor Author

kiorky commented May 18, 2015

can we grab rich-masquerading-destination back to master ?

@kiorky
Copy link
Contributor Author

kiorky commented May 20, 2015

thx ! merged, closing

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