Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: globalsi on March 29, 2017, 04:10:23 PM

Title: NAT file configuration
Post by: globalsi on March 29, 2017, 04:10:23 PM
Hi,
Where can I find the file wich contain the NAT configuration ?
Thks
Title: Re: NAT file configuration
Post by: Daniel B. on March 29, 2017, 04:35:00 PM
If you're talking about PAT rules, they can be set directly from the server-manager (Security -> Port forward). Under the hood, those rules end in /etc/rc.d/init.d/masq. For NAT, there's a single rule, hardcoded in /etc/e-smith/templates/etc/rc.d/init.d/masq/40masqLAN (which is: masqerade outbound IP to the external interface's IP). Depends on what you want to achieve :-)
Title: Re: NAT file configuration
Post by: globalsi on March 30, 2017, 09:56:02 AM
Thank you very much for this perfect answer ! (I was actually looking for the PAT)
Title: Re: NAT file configuration
Post by: globalsi on April 03, 2017, 11:18:00 AM
Do you know what are the templates that generate the port forwarding in /etc/rc.d/init.d/masq ?

I don't find them as 40masqLAN for the NAT.
Title: Re: NAT file configuration
Post by: Daniel B. on April 03, 2017, 11:22:51 AM
Port forwarding are handled by those templates:

/etc/e-smith/templates/etc/rc.d/init.d/masq/42SetupPortForwarding
/etc/e-smith/templates/etc/rc.d/init.d/masq/91adjustPortForward
Title: Re: NAT file configuration
Post by: globalsi on April 03, 2017, 12:38:29 PM
I don't see the port forwarding I created in this files
Title: Re: NAT file configuration
Post by: Stefano on April 03, 2017, 12:41:50 PM
ahem..

you'd tell us what you are trying to achieve (your problem, not your solution), what you did and how you did it.. :-)

"I don't see the port forwarding I created in this files" is quite useless for us, isn't it?
Title: Re: NAT file configuration
Post by: globalsi on April 03, 2017, 12:49:15 PM
Hi,
I want to find the PAT configuration of a broken server
I think I can read the disk by removing it from the machine and I would like to find this information somewhere on the disk.
Title: Re: NAT file configuration
Post by: Stefano on April 03, 2017, 01:51:47 PM
so you need the portforward_* files you find in /home/e-smith/db/ dir on the broken server's hd
Title: Re: NAT file configuration
Post by: globalsi on April 03, 2017, 02:04:37 PM
:) perfect
thank you !
Title: Re: NAT file configuration
Post by: Stefano on April 03, 2017, 02:07:10 PM
you are welcome..

BTW, to avoid the typical X Y problem (http://xyproblem.info/) situation, in the future tell us what's your issue ;-)

thank you