[][src]Struct dfw::nftables::types::Defaults

pub struct Defaults {
    pub custom_tables: Option<Vec<Table>>,
    pub initialization: Option<Initialization>,

The defaults/configuration for the nftables backend.


custom_tables: Option<Vec<Table>>

Specify the names of custom nft-tables that should be partially managed.


If you want to use or already use an existing nftables table to manage rules independently from DFW, it is important that two conditions are met:

  1. The priority-values of the chains are lower than the priority-values used by DFW.
  2. The default-policy of the any input or forward chains in the table are set to accept.

While DFW cannot ensure that the first condition is met (since changing the priority of a chain is not possible without recreating the chain), it can set the policies of your input and output chains to accept for you.


custom_tables = { name = "filter", chains = ["input", "forward"] }
custom_tables = [
    { name = "filter", chains = ["input", "forward"] },
    { name = "custom", chains = ["input", "forward"] }
initialization: Option<Initialization>

The optional initialization section.


rules = [
    "add table inet custom",
    "flush table inet custom",

Trait Implementations

impl Clone for Defaults[src]

impl Debug for Defaults[src]

impl Default for Defaults[src]

impl<'de> Deserialize<'de> for Defaults[src]

impl Eq for Defaults[src]

impl PartialEq<Defaults> for Defaults[src]

impl StructuralEq for Defaults[src]

impl StructuralPartialEq for Defaults[src]

Auto Trait Implementations

impl RefUnwindSafe for Defaults

impl Send for Defaults

impl Sync for Defaults

impl Unpin for Defaults

impl UnwindSafe for Defaults

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,