Contribs.org

Please login or register.

Login with username, password and session length

News:

We need you! Please help us to make SME Server a better product. More info here

Pages: [1]   Go Down

Author Topic: NAT file configuration  (Read 366 times)

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
NAT file configuration
« on: March 29, 2017, 04:10:23 PM »

Hi,
Where can I find the file wich contain the NAT configuration ?
Thks
Logged

Daniel B.

  • Site Administrator
  • *
  • Offline Offline
  • Posts: 1,442
    • Firewall Services, la sécurité des réseaux
Re: NAT file configuration
« Reply #1 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 :-)
Logged
C'est la fin du monde !!! :lol:

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
Re: NAT file configuration
« Reply #2 on: March 30, 2017, 09:56:02 AM »

Thank you very much for this perfect answer ! (I was actually looking for the PAT)
« Last Edit: March 30, 2017, 09:57:36 AM by globalsi »
Logged

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
Re: NAT file configuration
« Reply #3 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.
Logged

Daniel B.

  • Site Administrator
  • *
  • Offline Offline
  • Posts: 1,442
    • Firewall Services, la sécurité des réseaux
Re: NAT file configuration
« Reply #4 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
Logged
C'est la fin du monde !!! :lol:

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
Re: NAT file configuration
« Reply #5 on: April 03, 2017, 12:38:29 PM »

I don't see the port forwarding I created in this files
Logged

Stefano

  • Site Administrator
  • *
  • Offline Offline
  • Posts: 10,216
  • Skype account: maghissimo
    • Smeserver italian community
Re: NAT file configuration
« Reply #6 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?
Logged
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
Re: NAT file configuration
« Reply #7 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.
Logged

Stefano

  • Site Administrator
  • *
  • Offline Offline
  • Posts: 10,216
  • Skype account: maghissimo
    • Smeserver italian community
Re: NAT file configuration
« Reply #8 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
Logged
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

globalsi

  • Just can't stay away
  • ***
  • Offline Offline
  • Posts: 122
Re: NAT file configuration
« Reply #9 on: April 03, 2017, 02:04:37 PM »

:) perfect
thank you !
Logged

Stefano

  • Site Administrator
  • *
  • Offline Offline
  • Posts: 10,216
  • Skype account: maghissimo
    • Smeserver italian community
Re: NAT file configuration
« Reply #10 on: April 03, 2017, 02:07:10 PM »

you are welcome..

BTW, to avoid the typical X Y problem situation, in the future tell us what's your issue ;-)

thank you
Logged
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia
Pages: [1]   Go Up
 

Page created in 0.043 seconds with 24 queries.