I have pfSense (FreeBSD 11.2-p6) in use and I want to be able to use the prefix-set config feature (https://man.openbsd.org/bgpd.conf#prefix-set)
I add a simple
prefix-set bogons { 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7 }
in my /var/etc/openbgpd/bgpd.conf file (as per docs)
But when restarting bgpd it fails on that line as if there is an issue with the syntax:
bgpd -n -f /var/etc/openbgpd/bgpd.conf
/var/etc/openbgpd/bgpd.conf:11: syntax error
Yes, line 11 is the prefix-set line
How do I get prefix-set to work ?
Turns out I was looking at https://man.openbsd.org/bgpd.conf while I should have been looking at the docs from https://www.freebsd.org/cgi/man.cgi?query=bgpd.conf as per Richard Smith's reply.
prefix-set is not a thing in FreeBSD bgpd
Related
Hi Some one please help me to find couch.ini file for my couchdb [v1.6].
when i do couchdb -c i am able to see only default.ini and local.ini.
Is there a command to find the same?
At this link we read:
(0.8) Add the following line to the couch.ini file
DbUpdateNotificationProcess=/PATH/TO/view_updater.rb
(0.9+) Add the following section to the local.ini file:
[update_notification]
view_updater=/PATH/TO/view_updater.rb
Your version is 1.6 which is 0.9+, therefore you need to add the following line to local.ini:
[update_notification]
view_updater=/PATH/TO/view_updater.rb
When I try send an email using Net::SMTP::TLS from perl script I am getting below:
invalid SSL_version specified at /usr/local/share/perl5/IO/Socket/SSL.pm line 598
OS:Linux
You know what the problem is and what I have to do to fix it?
Thank you!
Net::SMTP::TLS is not maintained since 10 years and it is broken in that it causes exactly the error you describe. If you insist of using this broken module you need to fix it. Change the code in line 182 to remove the invalid setting of SSL_version:
if(not IO::Socket::SSL::socket_to_SSL($me->{sock},
- SSL_version => "SSLv3 TLSv1")){
+ )){
croak "Couldn't start TLS: ".IO::Socket::SSL::errstr."\n";
}
Instead of using the broken and unmaintained Net::SMTP::TLS or its successor but again unmaintained Net::SMTP::TLS::ButMaintained I suggest you use the latest version of Net::SMTP which has built in support for both kinds of SMTP+SSL and for IPv6 too. It comes already by default with newer Perl versions.
If using a new Net::SMTP is not possible you might use Net::SSLGlue::SMTP which monkey patches older Net::SMTP version to add SSL support. And there is also Net::SMTPS which provides a similar functionality.
Let me summarize as I had just fixed my problem (Thanks to the contributors above)
Open [Perl_dir]/site/lib/Net/SMTP/TLS.pm
Look for line 182, which looks like
if(not IO::Socket::SSL::socket_to_SSL($me->{sock}, SSL_version=>"SSLv3 TLSv1")){
Changed to line below by removing "SSL_version=>"SSLv3 TLSv1"
if(not IO::Socket::SSL::socket_to_SSL($me->{sock})){
Save [Perl_dir]/site/lib/Net/SMTP/TLS.pm
Other ref URL:
http://www.pclinuxos.com/forum/index.php/topic,143156.msg1223280.html#msg1223280
I am trying to add a line to an existing file /etc/fuse.conf. I tried this
added a folder two folders under modules directory
sudo mkdir /etc/puppet/modules/test
sudo mkdir /etc/puppet/modules/test/manifests
Then created a test.pp file and added following lines
sudo vim /etc/puppet/modules/test/manifests/test.pp
file { '/etc/fuse.conf':
ensure => present,
}->
file_line { 'Append a line to /etc/fuse.conf':
path => '/etc/fuse.conf',
line => 'Want to add this line as a test',
}
After that I ran this command
puppet apply /etc/puppet/modules/test/manifests/test.pp
Then I opened this file /etc/fuse.conf and there was no change in the file. The line was not added to the file. I don't understand what I am missing here. How can I do this?
Interesting. I ran the same test you did without an issue, and as long as you have stdlib installed in your environment you should be fine.
https://forge.puppet.com/puppetlabs/stdlib
The results of running the same steps you outlined were successful for me:
[root#foreman-staging tmp]# puppet apply /etc/puppet/modules/test/manifests/test.pp
Notice: Compiled catalog for foreman-staging.kapsch.local in environment production in 0.18 seconds
Notice: /Stage[main]/Main/File[/etc/fuse.conf]/ensure: created
Notice: /Stage[main]/Main/File_line[Append a line to /etc/fuse.conf]/ensure: created
Notice: Finished catalog run in 0.24 seconds
What did your puppet run output?
You should use templates (ERB) to handle file configuration. Its easier and cleaner.
Check the puppet docs for it in :
https://docs.puppetlabs.com/puppet/latest/reference/lang_template.html
There are other options though. e.g. Augeas which is an API for file configuration and integrate very well with Puppet. http://augeas.net/index.html
[]'s
There are a few ways to handle this. If it's ini file you can use ini_setting. If it's supported by augeas you can use that. Otherwise try specifying the after parameter to file_line
Trying to run PHPUnit on my Kohana 2.3.4 install:
phpunit --colors --bootstrap=index.php ../../modules/phpunit/libraries/Tests.php
Getting an error at one of my modules:
<p><tt>modules/core/helpers/MY_url.php <strong>[118]:</strong></tt></p>
<p><code class="block">Undefined index: HTTP_HOST</code></p>
I realize this is happening since I'm going via command line so HTTP_HOST won't be set. Is there any way around this without rewriting HTTP_HOST in that module? I know I could rewrite it to be exec(hostname), but am trying to avoid rewriting every instance of HTTP_HOST in my code.
Any workaround you can think of?
Quick and dirty way to fix it would be to set the value in the bootstrap if you're in cli mode.
The "better" way would be to set it in the test's setUp method
Is this $_SERVER['HTTP_HOST']?
If so, have a look at adding an xml config file and setting it in there:
https://phpunit.de/manual/current/en/appendixes.configuration.html
We actually decided to use a different bootstrap, load in variables there, then require the Kohana index file.
Works like a charm. Thanks, Matt, for getting me started down that path.
Where in ccnet.config set version? I search and read docs but there is no version mentioned.
You can add this line in your config file:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/5">
It is mentionned in this tracker CCNET-1870 :
http://jira.public.thoughtworks.org/browse/CCNET-1870
#Andy I got the same error in one of my configurations.
If you use cb:include in your configuration file, you should also give xmlns=version-url cb:config-template in configuration files included by cb:include.