OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Aliases aren´t fine
« previous next »
  • Print
Pages: [1]

Author Topic: Aliases aren´t fine  (Read 4078 times)

carlosvillalba

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Aliases aren´t fine
« on: March 14, 2018, 09:45:13 am »
Hello:

Aliases composed by several hosts doesn´t works.
I hope this error can be corrected fastly.

Thank you.
Logged

elektroinside

  • Hero Member
  • *****
  • Posts: 574
  • Karma: 51
    • View Profile
Re: Aliases aren´t fine
« Reply #1 on: March 14, 2018, 09:53:48 am »
Please define "doesn't work" in detail. Thanks.
Logged
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Aliases aren´t fine
« Reply #2 on: March 14, 2018, 06:50:02 pm »
Also, which version are you using?


Thanks,
Franco
Logged

netranger

  • Newbie
  • *
  • Posts: 39
  • Karma: 5
    • View Profile
Re: Aliases aren´t fine
« Reply #3 on: March 15, 2018, 12:13:50 am »
Hi!

I too noticed that the aliases stopped working for me after upgrading to 18.1.4.

Alias looks like this: alias2.png
Firewallrule for testing looks like this: fwrule.png

When I change the content of the alias to the IP of my machine and restart the ping, it is being blocked -> rule working correctly.

This was working for me with 17.7. I was able to test this issue on two different machines. Are we doing something wrong?

Cheers
Logged

john9527

  • Newbie
  • *
  • Posts: 22
  • Karma: 1
    • View Profile
Re: Aliases aren´t fine
« Reply #4 on: March 15, 2018, 01:35:27 am »
I may have something similar.  18.1.4 and possibly all of 18.1.x (didn't run too much on the earlier releases).

Have several alias's defined which reference local hostnames (have tried with and without domain)
These local clients are assigned addresses by DHCP (not static)
dnsmasq and unbound are configured to to register DCHP leases (I use both for various clients)

After rebooting, all the alias's defined with the local hostnames are not populated with ip's.   Pinging a client by hostname may cause the alias to be populated (haven't confirmed this is consistent yet).
« Last Edit: March 15, 2018, 01:42:22 am by john9527 »
Logged

opnsense_user12123

  • Guest
Re: Aliases aren´t fine
« Reply #5 on: March 16, 2018, 10:04:09 am »
I have the same problem using "Alias" since the 18.1 version but nobody believed me! :-(
Logged

elektroinside

  • Hero Member
  • *****
  • Posts: 574
  • Karma: 51
    • View Profile
Re: Aliases aren´t fine
« Reply #6 on: March 16, 2018, 10:18:34 am »
Are you all guys using aliases for local hostnames? Why? Why?
Logged
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

marjohn56

  • Hero Member
  • *****
  • Posts: 1677
  • Karma: 171
    • View Profile
Re: Aliases aren´t fine
« Reply #7 on: March 16, 2018, 12:05:48 pm »
@elektroinside - Indeed

Try this guys, use the static IP's you've already defined. As shown in the first image.

Rule is then as shown in image2



Logged
OPNsense 21.7 - Qotom Q355G4 - ISP - Community Fibre 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

elektroinside

  • Hero Member
  • *****
  • Posts: 574
  • Karma: 51
    • View Profile
Re: Aliases aren´t fine
« Reply #8 on: March 16, 2018, 02:21:05 pm »
Exactly. There is no DNS failure involved in this case.
If the DNS lookup fails for any reason, the alias cannot work.

But, as always, I would recommend to fix all DNS issues and use a properly configured DNS server/chain to resolve dns queries.
Logged
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

john9527

  • Newbie
  • *
  • Posts: 22
  • Karma: 1
    • View Profile
Re: Aliases aren´t fine
« Reply #9 on: March 16, 2018, 04:44:03 pm »
Quote from: elektroinside on March 16, 2018, 10:18:34 am
Are you all guys using aliases for local hostnames? Why? Why?
I prefer to use static IPs only for my network components (switches, APs, etc) and have all my clients get addresses via DHCP.

Then I add the appropriate local hostnames to an alias 'MEDIA_PLAYERS' for example, and write rules that restrict their access to only certain LAN clients (also an alias of local hostnames called 'MEDIA_SERVERS')
Logged

elektroinside

  • Hero Member
  • *****
  • Posts: 574
  • Karma: 51
    • View Profile
Re: Aliases aren´t fine
« Reply #10 on: March 16, 2018, 05:09:42 pm »
Quote from: john9527 on March 16, 2018, 04:44:03 pm
Quote from: elektroinside on March 16, 2018, 10:18:34 am
Are you all guys using aliases for local hostnames? Why? Why?
I prefer to use static IPs only for my network components (switches, APs, etc) and have all my clients get addresses via DHCP.

Then I add the appropriate local hostnames to an alias 'MEDIA_PLAYERS' for example, and write rules that restrict their access to only certain LAN clients (also an alias of local hostnames called 'MEDIA_SERVERS')

Overcomplicated and unnecessary design with too much work for the fw and prone to errors... I do agree that the best design is using DHCP, but only after configuring static leases for each LAN client.

With your design, you have to make sure that if the client changes its IP, that is registered in the DNS resolver (this involves 2 failing points: the DNS server and the client). Then, when a rule is hit involving the alias, the fw has to query the DNS server to resolve the hostname configured in the alias. If, for whatever reason this fails, several attempts will be made to resolve the query in many different ways (with or without DNS suffix etc). If this fails, it will be forwarded to the upstream DNS servers. If this fails, then you will get an error. So too much, unnecessary work.. prone to failures.

Not to mention that everything will eventually end up to an IP address anyways...
« Last Edit: March 16, 2018, 08:01:17 pm by elektroinside »
Logged
OPNsense v18 | HW: Gigabyte Z370N-WIFI, i3-8100, 8GB RAM, 60GB SSD, | Controllers: 82575GB-quad, 82574, I221, I219-V | PPPoE: RDS Romania | Down: 980Mbit/s | Up: 500Mbit/s

Team Rebellion Member

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Aliases aren´t fine
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2