Skip to content

how to use polycube-network to replace iptables nat masq ?? #422

Description

@pipul

iptables:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

polycube:
https://github.com/polycube-network/polycube/blob/master/src/services/pcn-nat/test/test_tcp_masq.sh
polycubectl nat add nat1
polycubectl router add r1

polycubectl router r1 ports add to_veth1 ip=$to_veth1_ip/24 peer=veth1
polycubectl router r1 ports add to_veth2 ip=$to_veth2_ip/24 peer=veth2

polycubectl attach nat1 r1:to_veth2 position=first

polycubectl nat1 rule masquerade enable

i don't understand what is the router use for
this example seem complicated for me

Activity

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