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

NAT gateway question #1926

Open
pasztorl opened this issue Feb 16, 2025 · 2 comments
Open

NAT gateway question #1926

pasztorl opened this issue Feb 16, 2025 · 2 comments

Comments

@pasztorl
Copy link

pasztorl commented Feb 16, 2025

Hi,

I've seen Sonic NAT feature, but it seems this is not a right thing for my setup.
I have connected clients with private addresses, and I would like to set up the sonic switch to act as NAT gateway, so NAT happens when a private node wants to communicate to world, but I don't want to allow the switch's public IP to dnat to a private host.
As I seen in the docs Sonic NAT always do snat and dnat between two nat zones. Is this something what can be disabled so make it just one way?
What are the options if i want just a "simple" NAT GW?

thanks!

@arunlk-dell
Copy link

config nat feature {enable | disable}
above command is used to enable and disable the NAT feature.

Follow the below links to understand/use the NAT config:
https://github.com/sonic-net/sonic-utilities/blob/master/doc/Command-Reference.md#nat-config-commands
https://github.com/sonic-net/sonic-utilities/blob/master/doc/Command-Reference.md#nat-show-commands
Other generic NAT link

@pasztorl
Copy link
Author

@arunlk-dell thank you! I've found these urls earlier, but what it is not clear for me how i do dnat just one way like a "home router". without dmz enabled. If i enable nat and add interfaces, zone(s) i see that dnat happens in two way. i don't want to forward connections created from outside to inside.

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

2 participants