Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
/etc/hosts issue
« previous
next »
Print
Pages: [
1
]
Author
Topic: /etc/hosts issue (Read 5034 times)
cristian_asir
Newbie
Posts: 20
Karma: 1
/etc/hosts issue
«
on:
May 06, 2019, 08:39:33 am »
Hello, I have an issue with /etc/hosts.
I make changes in /etc/hosts but when I reboot OPNsense this changes dissapear and I have the same content than before.
Is so strange but I need to resolve it because I want to join an AD domain
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: /etc/hosts issue
«
Reply #1 on:
May 06, 2019, 08:50:07 am »
What are you trying to add? Normally you use Unbound or Dnsmasq host overrides to fill that file.
Cheers,
Franco
Logged
cristian_asir
Newbie
Posts: 20
Karma: 1
Re: /etc/hosts issue
«
Reply #2 on:
May 06, 2019, 08:55:06 am »
That
127.0.0.1 localhost.localdomain localhost
10.109.2.80 OPNsense.localdomain OPNsense
search proxy.asir
domain proxy.asir
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: /etc/hosts issue
«
Reply #3 on:
May 06, 2019, 08:56:52 am »
Do you need this info for clients only or the firewall as well? BTW, "search" and "domain" belong to resolv.conf (which is also rewritten for safety).
Cheers,
Franco
Logged
cristian_asir
Newbie
Posts: 20
Karma: 1
Re: /etc/hosts issue
«
Reply #4 on:
May 06, 2019, 09:03:10 am »
Sorry sorry...
I try to write
127.0.0.1 localhost.localdomain localhost
10.109.2.80 OPNsense.localdomain OPNsense
(/etc/hosts)
But when I reboot OPNsense the second line (10.109.2.80 OPNsense.localdomain localdomain) changes and I have other line content
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: /etc/hosts issue
«
Reply #5 on:
May 06, 2019, 09:04:35 am »
Yup, you can use Dnsmasq and Unbound host overrides to achieve this.
Cheers,
Franco
Logged
cristian_asir
Newbie
Posts: 20
Karma: 1
Re: /etc/hosts issue
«
Reply #6 on:
May 06, 2019, 09:14:43 am »
I will try it, thanks for your help!!
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: /etc/hosts issue
«
Reply #7 on:
May 06, 2019, 09:26:04 am »
Sure, let us know if it works. It might not end up in /etc/hosts specifically, but it will be served by Unbound/Dnsmasq itself.
Cheers,
Franco
Logged
cristian_asir
Newbie
Posts: 20
Karma: 1
Re: /etc/hosts issue
«
Reply #8 on:
May 06, 2019, 09:28:39 am »
root@OPNsense:~ # cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
192.168.60.1 OPNsense.localdomain OPNsense
>> This is the issue: I have the ip of one of my clients interfaces. AND I WANT the IP of my firewall
(
root@OPNsense:~ # cat /etc/resolv.conf
domain localdomain
nameserver 10.109.2.80
root@OPNsense:~ #
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
/etc/hosts issue