Hierarchy

  • EventEmitter
    • IPTables

Constructors

  • Constructs a new instance of the helper/wrapper

    Parameters

    Returns IPTables

Properties

options: Options

Methods

  • Protected

    Adds a jump statement for the specified IP address to the IPTables chain

    Parameters

    • host: string
    • jumpTarget: string = 'ACCEPT'
    • nothrow: boolean = false

    Returns Promise<void>

  • Adds a jump statement for the specified interface to the IPTables chain

    Parameters

    • iface: string
    • jumpTarget: string = 'ACCEPT'
    • nothrow: boolean = false

    Returns Promise<void>

  • Adds a jump statement for the specified IP address to the IPTables chain

    Parameters

    • host: string
    • jumpTarget: string = 'ACCEPT'

    Returns Promise<boolean>

  • Adds a jump statement for the specified interface to the IPTables chain

    Parameters

    • iface: string
    • jumpTarget: string = 'ACCEPT'

    Returns Promise<boolean>

  • Deletes the specified IP address from the IPTable chain

    Parameters

    • host: string

    Returns Promise<boolean>

  • Deletes the specified interface from the IPTable chain

    Parameters

    • iface: string

    Returns Promise<boolean>

  • Flushes the IPTables chain

    Parameters

    • nothrow: boolean = false

    Returns Promise<void>

  • Flushes the IPTables chain and clears our knowledge of all known entries

    Returns Promise<void>

  • Bumps the keep alive time for the specified IP address in the list of known entries

    Parameters

    • host: string

    Returns Promise<void>

  • Parameters

    • event: "error"
    • listener: ((error) => void)
        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns this

  • Parameters

    • event: "expired"
    • listener: ((key) => void)
        • (key): void
        • Parameters

          • key: any

          Returns void

    Returns this

  • Protected

    Rebuilds the IPTables change from the cache

    Returns Promise<boolean>