osxfuse error fix

During osxfuse installation from ports I stumbled into the following error:

—> Building osxfuse
Error: Failed to build osxfuse: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_fuse_osxfuse/osxfuse/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug

The fix was the following:

cd /Applications/Xcode.app/Contents/Developer/Toolchains
sudo ln -s XcodeDefault.xctoolchain OSX10.13.xctoolchain
ls -l
lrwxr-xr-x 1 root wheel 24B Mar 17 17:53 OSX10.13.xctoolchain -> XcodeDefault.xctoolchain
drwxr-xr-x 5 root wheel 160B Dec 18 13:43 XcodeDefault.xctoolchain/

This is on the latest High Sierra, 10.13.3


On deadline – ABC27 News – How Lyme disease affects your brain

You think Lyme is hard to catch and easy to get rid off? That’s a LIE! Actually is the other way around. Those tiny bastards are out there trying to make your life miserable, don’t give them a chance. Learn and stay vigilant!

On Deadline By abc27 News has a recent podcast about it, listen it, you won’t regret.

On Deadline By abc27 News Podcast – How Lyme disease affects your brain.
Here is an article about it: http://abc27.com/2018/03/06/how-lyme-disease-affects-your-brain/


Mikrotik Script

Here is simple script which sends your IP address to your email, it will save you paying for a fix IP service from your ISP, unless you have a different case.

:global ipadd;
:global extinterface "ether1-gateway"
:local thisip [/ip address get [/ip address find interface=$extinterface ] address];

:if ($ipadd != $thisip) do={
 /tool e-mail send to="youremail@address.org" subject="ip change" body="IP $thisip";
 set ipadd $thisip;

For this you’ll need an email account from where you’re sending the emails, that can be set up here: /tool e-mail

You can find the scripts under /system script and you can schedule them under /system scheduler. For example you can run the script above each morning so you’ll receive the IP while enjoying your coffee. There is so much more that can be done with them, I might cover a few later.

More on scripts here: https://wiki.mikrotik.com/wiki/Manual:Scripting


Mikrotik with NetFlow on FreeBSD

A short how to adding NetFlow to Mikrotik using ntop and FreeBSD. FreeBSD is the best operating system you can go for your server. While Mikrotik is a budget router it is capable of many. I’m covering Ntop not Ntopng. While Ntopng is fancier, requires a probe to collect NetFlow which is not free. Without the probe you can still collect traffic on the server where Ntopng is installed but not from another device. You can buy a NetFlow capable Mikrotik router for less than $50. Of course, if you have the big bucks you can go with a Cisco and Ntopng.

This article assumes you know already how to install FreeBSD and do basic configurations on Mikrotik.

Let’s install Ntop, this can be done using precompiled packages or from source.

Package, using pkg
pkg install ntop
pkg will update automatically it’s repository, however you can can also invoke it manually with pkg update. 
Ready carefully the details, only proceed if you agree with all what the package manager is telling

Source, using ports
Ports however won’t update automatically the ports tree, you have to do it yourself, be sure to do this before installing anything from ports
portsnap fetch
portsnap update

cd /usr/ports/net/ntop
make config-recursive
make install clean

Using config-recursive instead of config will configure all dependencies as well, so you can step away while the source code is compiling, it could take awhile.
Installing software from ports and packages on the same server requires lots of attention, so be careful. Explaining is out of the scope of this article.

After you installed ntop enable it:
sysrc ntop_enable="YES" or carefully add it manually to /etc/rc.conf.
Additional flags can be set, like sysrc ntop_flags="-d --use-syslog=daemon -u nobody -4"

  • -d: run as a demon
  • –use-syslog=daemon: ave the messages into the system log
  • -u nobody: run as user nobody
  • -4: IPv4 only

Now start the service:
# service ntop start
Starting ntop.
Sun Feb 11 16:25:58 2018 Initializing gdbm databases
# service ntop status
ntop is running as pid 4277.

You should see the service running and listening on 3000/tcp:
# sockstat -l|grep ntop
nobody ntop 512 2 tcp4 *:3000 *:*
nobody ntop 512 8 dgram (not connected)

Now go to http://address_of_your_server:3000, voila, there is your Ntop.
Let’s add the NetFlow support.
Go to Plugins-NetFlow-Active

  • Set NetFlow Device – Whatever name you want for your device
  • Local Collector UDP Port – default is 2055
  • Virtual NetFlow Interface Network Address – address_of_your_server


Check if your server is listening
# sockstat -l|grep ntop
nobody ntop 512 2 tcp4 *:3000 *:*
nobody ntop 512 8 dgram (not connected)
nobody ntop 512 15 udp4 *:2055 *:*

Good. Now we can proceed configuring Mikrotik
[user@MikroTik] > ip traffic-flow set active-flow-timeout=1m enabled=yes
[user@MikroTik] > ip traffic-flow target add dst-address=address_of_your_server port=2055 v9-template-timeout=1m

Check if it is there
[user@MikroTik] > ip traffic-flow target print
Flags: X - disabled
0        address_of_your_server   2055       9

Go back to your browser, then Plugins-NetFlow-Statistics, you should see some data.

Of course you can use a Linux distro instead, but why would you use Linux when you can use FreeBSD?
Why do this? To see what really happens on your network and find some amazing details about it.


Raspberry Pi and FreeBSD

I’m writing down a few steps for the future me how I installed RaspBSD on a Raspberry Pi 3

  • Download http://www.raspbsd.org/
  • Insert memory card then:
    diskutil list
    sudo diskutil unmountDisk /dev/disk2
    sudo dd bs=1 if=insertFreeBSDImage.img of=/dev/disk2
  • While writing the image press ctrl+t to get progress (this works on OS-X & FreeBSD but not on Linux)
    • Boot Pi from the MicroSD card
    • set date

ntpdate 0.pool.ntp.org
Enable ntpd, NTP is important since the board has no batteries, time will be very off
sysrc ntpd_enable="YES"

  • If you are installing FreeBSD12 on it today (2018.02.11) then you’ll have to use 11’s pkg repository
    env ABI=FreeBSD:11:aarch64 pkg bootstrap
    Add “ABI = “FreeBSD:11:aarch64”; to /usr/local/etc/pkg/repo.vrt

cat /usr/local/etc/pkg.conf
ABI = "FreeBSD:11:aarch64";
all-depends: query %dn-%dv,
annotations: info -A,
build-depends: info -qd,
cinfo: info -Cx,
comment: query -i "%c",
csearch: search -Cx,
desc: query -i "%e",
download: fetch,
iinfo: info -ix,
isearch: search -ix,
prime-list: "query -e '%a = 0' '%n'",
prime-origins: "query -e '%a = 0' '%o'",
leaf: "query -e '%#r == 0' '%n-%v'",
list: info -ql,
noauto = "query -e '%a == 0' '%n-%v'",
options: query -i "%n - %Ok: %Ov",
origin: info -qo,
provided-depends: info -qb,
raw: info -R,
required-depends: info -qr,
roptions: rquery -i "%n - %Ok: %Ov",
shared-depends: info -qB,
show: info -f -k,
size: info -sq,

  • Then you should extend the HDD with uncommenting this line in /etc/rc.conf


If that doesn’t work take a look at my previous post.



A reminder.

If you are installing RaspBSD following the instruction from here then the default disk size is going to be 2GB no matter the size of the Micro SD card you’re using. This can be changed with:
gpart show
Pay attention and check what can be extended, in my case it was /dev/mmcsd0s2
gpart resize -i 1 mmcsd0s2 (where 1 is the the index,  mmcsd0 is the disk, s2 is the second slice)
growfs /dev/mmcsd0s2
In case after grows fails with Operation not permitted you need to start the growfs service
service growfs onestart

Then you don’t have to but won’t hurt a reboot



Let’s Talk About Food

So you think you know what is good food? If USDA approved it then must be, right? Well, maybe but just don’t be so sure about it. If millions of people are eating it then won’t hurt me? Are you sure?
Here is a an article focusing on Glutamate, it will tell you things about the food you might never hear of.

A few important quotes from it:

Excitotoxins are food additives that food producers use to stimulate taste centers in the brain for the purpose of creating an addiction (or at least an increased desire) for the product. Candy, snack food (Doritos have 4 different excitotoxins in its ingredients), Oriental dishes, and prepared meals are notorious for adding excitotoxins to stimulate the brain to desire more. It’s legal and considered ‘good business practice’ by food manufacturers as sales increase.


Remember: By food industry definition, all MSG is “naturally occurring.” “Natural” doesn’t mean “safe.” “Natural” only means that the ingredient started out in nature, like arsenic and hydrochloric acid.

The most important is:

When you eat real, whole foods, you automatically avoid MSG, aspartame and other excitotoxins. No need to memorize the whole list of different food additives, simply skip the processed junk and EAT REAL FOOD! The best advice is to eat food as close to the way God originally created it!

If you have the possibility to cultivate vegetables and fruits in your backyard, do it! Grass might be pretty but you can’t it.