Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pipul opened this issue Aug 21, 2022 · 0 comments
Open

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

pipul opened this issue Aug 21, 2022 · 0 comments

Comments

@pipul
Copy link

pipul commented Aug 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant