I’ve deployed nethserver 7.3 and I’ve noticed a problem with the access to internet. At certain moments the squid stops and it cancel, obviously, the connection to internet. I’ve checked the processor (top command), memory comsuption and processes (ps aux) and I have not found anything related to this behavior.
My server has these attributes CPU
model name : Intel® Xeon® CPU E31220 @ 3.10GHz
I found a possible solution. I was checking documentation and this lost of connection might be related to a behavior of squid. In short text, squid tries to connect to a web page using IPv6 (don’t know why and I haven’t seen any related to IPv6 in the .conf file) so adding this line “dns_v4_first on” in the .conf file, the squid will allways use IPv4 (according to squid documentation - http://www.squid-cache.org/Doc/config/dns_v4_first/). During all day, since I put that line, the disconnection hasn’t occured. I’ll keep testing.
I haven’t lost connection til now. But I realized that the line I put in squid.conf was missing so I added the same line in /etc/e-smith/templates/etc/squid/squid.conf/90options. And here I have another question. If I want to add a new domain o url inside a category pre-established, let’s say movies, I just add the domain, run the sudo -u squid /usr/sbin/ufdbConvertDB -d /var/squidGuard/blacklists/movies/ command, restart the ufdb service and it’s done… but after the “night update” that ufdb does, the domain that I’ve added, dissapears.
So, which file do I have to edit to keep this new add?
The file is squid.conf.
I just added the new line in this file > /etc/e-smith/templates/etc/squid/squid.conf/90options
and the change (new line) persists.
Please no, custom templates from copies of the original templates should be used only to override a default value or option.
In this case, simply add a new file called 91ipv4dns and put that single line in it (dns_v4_first on).
So, to recap, the best practice is to avoid copying standard templates to templates-custom directory unless you need to override a default behaviour.
And the commands for @lldm30 are:
Oh no, I really thought, that’s how to do it generally…but if there were new functions in new templates they’ll never be used as they would be overwritten by my custom templates.
OK, so what I can see it’s always possible to take 91somename for adding entries at the end.
One final note: if the syntax permits, sometimes we can override a variable re-defining it.
As an example, amavisd.conf permits redefinition, so if you want to change log_level you can redfine it at the end with a 92loglevel custom template. This way is preferred over copying and modifying /etc/e-smith/templates/etc/amavisd/amavisd.conf/10server.
@mrmarkuz The first thing to check is if squid is listening and you have any ip v6 routes on the system.
If the system has any ipv6 addresses else then on lo you should remove them and disable ipv6 auto addressing before you change to “dns_v4_first on” but it’s a relevant solution.
In cases like this what I am using is: http://gogs.ngtech.co.il/elicro/linux-ipv6-utils/src/master/remove-ipv6-addresses.sh
but do not know how it should be done on nethserver.
Best practice build over time and experience. These are not general rules that can be applied in all cases.
I agree that a note in the manual to give some guidelines would be helpful.
Pull request welcome.