IPTables.Net icon indicating copy to clipboard operation
IPTables.Net copied to clipboard

IpTablesParserException Unknown option: "--random-fully"

Open wlclass opened this issue 3 years ago • 2 comments

Thank you for a great job.👍 When I tested it on Ubuntu 20.04.3 LTS \ iptables v1.8.4 (legacy) .

var sys = new IpTablesSystem(new LocalFactory(), new IPTablesBinaryAdapter());
var chain = sys.GetChain("nat", "PREROUTING", 4);

I got an error :

IPTables.Net.Exceptions.IpTablesParserException: Error parsing rule:  -A KUBE-POSTROUTING -m comment --comment "kubernetes service traffic requiring SNAT" -j MASQUERADE --random-fully
 ---> IPTables.Net.Exceptions.IpTablesNetException: Unknown option: "--random-fully"
   at IPTables.Net.Iptables.Modules.CommandParser.FeedToSkip(Int32 position, Boolean not)
   at IPTables.Net.Iptables.IpTablesCommand.Parse(String rule, IpTablesSystem system, IpTablesChainSet chains, CommandParser& parserOut, Int32 version, String defaultTable)
   --- End of inner exception stack trace ---
   at IPTables.Net.Iptables.IpTablesCommand.Parse(String rule, IpTablesSystem system, IpTablesChainSet chains, CommandParser& parserOut, Int32 version, String defaultTable)
   at IPTables.Net.Iptables.IpTablesRule.Parse(String rule, IpTablesSystem system, IpTablesChainSet chains, Int32 version, String defaultTable, ChainCreateMode createChain)
   at IPTables.Net.Iptables.Adapter.Client.Helper.IPTablesSaveParser.GetRulesFromOutput(IpTablesSystem system, String output, String table, Int32 ipVersion, Boolean ignoreErrors)
   at IPTables.Net.Iptables.Adapter.Client.IPTablesBinaryAdapterClient.ListRules(String table)
   at IPTables.Net.IpTablesSystem.GetRules(IIPTablesAdapterClient client, String table)
   at IPTables.Net.IpTablesSystem.GetChain(IIPTablesAdapterClient client, String table, String chain)
   at IPTables.Net.IpTablesSystem.GetChain(String table, String chain, Int32  ipVersion)

wlclass avatar Jan 12 '22 12:01 wlclass

Yes an unsupported option to masqerade you can add. Acceptable PRs accepted.

splitice avatar Jan 12 '22 12:01 splitice

ok,thanks. I need to continue learning your project.

wlclass avatar Jan 13 '22 16:01 wlclass