Koozali.org: home of the SME Server

Hostnames panel - Error: IP cannot be server IP or Gateway IP.

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
My SME Server sits behind a pfSense router, which I'm trying to configure to send email notifications.  I want the notifications to come from admin@pfsense.mydomain, but when I configure pfSense that way, my SME server refuses the emails because it can't resolve the hostname.  If I configure pfsense to send the emails from admin@mydomain, they work, but then the from address doesn't reflect the system they're actually coming from.

The pfSense box acts as the DNS server for my network, but of course SME wants to do its own thing for DNS, and it won't resolve pfsense.mydomain.  So I figure, no problem, that's what the Hostnames and Addresses panel is for, right?

Maybe not.  I go to that panel and try to enter a hostname for pfsense.mydomain, and it gives the error message above.  Why?  Why should SME refuse to (internally) assign a hostname to the IP address of its default gateway?

Note:  Yes, I'm sure I could make this work if I told SME to use the pfSense box as a DNS server.  I may yet do that.  But this seems like a completely arbitrary restriction.  I can kind of understand locking out the SME Server's own OP (though a smart panel would recognize that and just set the hostname to "Self" rather than "Local" in that case), but I don't understand at all why there's such a restriction in place for the gateway IP.
......

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Hostnames panel - Error: IP cannot be server IP or Gateway IP.
« Reply #1 on: May 13, 2017, 06:54:20 PM »
AFAIR there's a bug for it
I'd like to give an hostname to my router/GW too

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Hostnames panel - Error: IP cannot be server IP or Gateway IP.
« Reply #2 on: May 13, 2017, 06:57:15 PM »
Ah, yes, right you are.  It's been open for 12 years.  https://bugs.koozali.org/show_bug.cgi?id=369
......

Offline ReetP

  • *
  • 3,732
  • +5/-0
Re: Hostnames panel - Error: IP cannot be server IP or Gateway IP.
« Reply #3 on: May 14, 2017, 11:11:03 AM »
Anyone tested the suggested patches on the bug?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline martijn

  • 1
  • +0/-0
Re: Hostnames panel - Error: IP cannot be server IP or Gateway IP.
« Reply #4 on: December 23, 2017, 04:18:48 PM »
This is an old post, but this is what works for me.

Edit the database directly (it may help if you first create some LOCAL dns entries (reservations) with MAC and IP from the /server-manager as an example):
nano -w /home/e-smith/db/hosts

Tell the system what you just did (or reboot+reconfigure):
signal-event host-create


Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Hostnames panel - Error: IP cannot be server IP or Gateway IP.
« Reply #5 on: December 24, 2017, 04:02:45 PM »
I set discrete alert sender emails using the built-in hyphen aliases on a sme server.

In this case I would set the pfsense email "from" address to "admin-pfsense@mydomain.com"