Skip to content

IpTablesRule.Parse() exception because Tcp ModuleEntry is not loaded #36

Description

@mark1145

Hi,

I'm trying to create a new rule, but when doing IpTablesRule.Parse() it throws an exception Unknown option: "--source-port".

From what I can see in the code, I believe it's because the TcpModule is not being loaded into the CommandParser. Do I need to somehow Load the module first? How would I go about parsing other rules where the module is not loaded by default please?
https://github.com/splitice/IPTables.Net/blob/master/IPTables.Net/Iptables/Modules/Tcp/TcpModule.cs

Thank you!

IPTables.Net.Exceptions.IpTablesNetException: Unknown option: "--source-port"
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions