-
Notifications
You must be signed in to change notification settings - Fork 184
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
--random parameter not working with SNAT #339
Comments
Hi @tom130380 , I don't have an access to a Linux box at the moment, but could you try adding the rule via the CLI with the |
Hi @jllorente , [root@mybox ~]# iptables -A POSTROUTING -s 10.10.121.254/32 -j SNAT --to-source 10.10.101.254 --random -t nat [root@mybox ~]# iptables -S -t nat
[root@mybox ~]# python
|
Hi @tom130380, I was able to reproduce your steps, and while I haven't been involved with this project for many years now, I do remember something about the native Table/Chain/Rule modules having some particularities to them, specially if you were playing around with a rule without inserting it into the kernel or reading it from a chain. Sorry I cannot be of more help! On a personal note, I have relied heavily on the |
Hi @jllorente , thanks for your reaction. I'm not sure though why you say it's not a bug because with the current implementation, it is impossible to insert a rule in the kernel with the "--random" parameter. |
This problem no longer occurs, at least with iptables with version 1.8.9. I think it should be added to the known issues. |
There seems to be an issue storing the --random parameter in the list of parameters of an SNAT target:
or via encoding a rule by using a dict and then decoding it again:
Am I missing something or is this indeed a bug?
The text was updated successfully, but these errors were encountered: