Skip to content

Research the best way to configure iptables #1

Description

@dguido

Which one of these is "right"?

  • iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE
  • iptables -A POSTROUTING -s 10.0.0.0/24 -m policy --dir out --pol ipsec -j ACCEPT
  • iptables -t nat -A POSTROUTING -o eth0 ! -p esp -j SNAT --to-source [server IP]

Activity

  1. jackivanov commented on Jul 12, 2016

    @jackivanov
    Collaborator

    The best way it is SNAT. MASQUERADE more usable with a dynamic IP and if we don't know the global ip of a server.
    We will use this:
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

  2. added a commit that references this issue on Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions