Category Archives: Operation Systems

VMware: vmware-workstation-server does not start

Question

# /etc/init.d/vmware-workstation-server start

[...]

Hostd: error: N7Vmacore15SystemExceptionE(Cannot assign requested address)
Hostd: backtrace:
Hostd: backtrace[00] rip 00007f671e28d2e4 Vmacore::System::Stacktrace::CaptureWork(unsigned int)
Hostd: backtrace[01] rip 00007f671e058374 Vmacore::System::SystemFactoryImpl::CreateQuickBacktrace(Vmacore::Ref&)
Hostd: backtrace[02] rip 00007f671dfeb5a8 Vmacore::Throwable::Throwable(std::string const&)
Hostd: backtrace[03] rip 00007f671e2736de Vmacore::SystemException::SystemException(Vmacore::SystemErrorCode const&)
Hostd: backtrace[04] rip 00007f671e24111e Vmacore::System::TCPServerSocketPosix::BindAndListenInt(int, sockaddr*, unsigned long)
Hostd: backtrace[05] rip 00007f671e245b91 Vmacore::System::TCPServerSocketPosix::BindAndListen(std::string const&, int)
Hostd: backtrace[06] rip 0000000000a1daa5 /usr/lib/vmware/bin/vmware-hostd() [0xa1daa5]
Hostd: backtrace[07] rip 0000000000a1f862 /usr/lib/vmware/bin/vmware-hostd() [0xa1f862]
Hostd: backtrace[08] rip 0000000000a26041 /usr/lib/vmware/bin/vmware-hostd() [0xa26041]
Hostd: backtrace[09] rip 00007f671e00bb88 Vmacore::Service::AppImpl::StartPlugins()
Hostd: backtrace[10] rip 00007f671e00acac Vmacore::Service::InitApp(Vmacore::Service::Config*)
Hostd: backtrace[11] rip 00000000013f57fd /usr/lib/vmware/bin/vmware-hostd() [0x13f57fd]
Hostd: backtrace[12] rip 00000000013ebc28 /usr/lib/vmware/bin/vmware-hostd() [0x13ebc28]
Hostd: backtrace[13] rip 00000000013f8a11 /usr/lib/vmware/bin/vmware-hostd() [0x13f8a11]
Hostd: backtrace[14] rip 00007f671bd75ead /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f671bd75ead]
Hostd: backtrace[15] rip 0000000000a1bed9 Vmomi::PrivilegeChecker::CheckEntityPrivilege(Vmomi::MoRef*, Vmacore::Session*, std::string const&)
Hostd:

Answer

Enable loopback interface!

vmware-modconfig_console_install-all

sipXecs 4.6.0: DNS Korrektur

<%
  def record_id(id)
    if defined? :print_record_ids
      ";; RECORDS: #{id}\n"
    end
  end
%>$TTL 1800
@       IN     SOA    ns1.<%= domain %>. root.<%= domain %>. (
                       <%= serialno %> ; serial#
                       1800            ; refresh, seconds
                       1800            ; retry, seconds
                       1800            ; expire, seconds
                       1800 )          ; minimum TTL, seconds

<% 
  unless dns_servers.nil?
    dns_servers.each { |server| 
%><%= domain %>.            IN     NS     <%= server[:name] %>.
<%
    }
  end

%><%= record_id('naptr') %><%

  naptr_protocols.each { |proto| 
  protoCode = 'SIP+D2' + proto[0,1].upcase  # SIP+D2T
%><%= domain %>.               IN      NAPTR   2 0 "s" "<%= protoCode %>" "" _sip._<%= proto %>.<%= domain %>.
<%} 

%><%= record_id('proxy') %><%

  # distribute traffic equally for now to each proxy
  sip_protocols.each { |proto|
    if proxy_servers
      proxy_servers.each { |server| 
        if proto == 'tls'
%>_sips._tcp.<%= domain %>.     IN      SRV     10 10 5061 <%= server[:name] %>.
_sip._tls.<%= domain %>.     IN      SRV     10 10 5061 <%= server[:name] %>.
<%
        else

%>_sip._<%= proto %>.<%= domain %>.     IN      SRV     10 10 5060 <%= server[:name] %>.
<%      end
      }
    end
  }

%><%= record_id('rr') %><%

  if resource_records
    resource_records.each { |rr|
      if rr[:records]
        rr[:records].each { |a|
%><%= rr[:proto] %>.<%= rr[:resource] %>.<%= domain %>.   IN    SRV   10 10 <%= a[:port] %> <%= a[:target] %>.
<%
          rr[:records].each { |b|
            # give priority to local registrar
            rr_priority = (a == b ? '10' : '20')
%><%= rr[:proto] %>.<%= rr[:resource] %>.<%= a[:name] %>.   IN    SRV   <%= rr_priority %> 10 <%= b[:port] %> <%= b[:target] %>.
<%        } 
        }
      end
    } 
  end

%><%= record_id('im') %><%

  if im_servers
    im_servers.each { |server| 
%>_xmpp-server._tcp.<%= domain %>.     IN   SRV   10  10  5269  <%= server[:name] %>.
_xmpp-client._tcp.<%= domain %>.     IN   SRV   10  10  5222  <%= server[:name] %>.
_xmpp-server._tcp.conference.<%= domain %>.     IN   SRV   10  10  5222  <%= server[:name] %>.
_xmpp-client._tcp.conference.<%= domain %>.     IN   SRV   10  10  5222  <%= server[:name] %>.
<%  } 
  end

%><%= record_id('a') %><%
  if all_servers
    all_servers.each { |server| 
%><%= server[:name] %>.           IN      A       <%= server[:ipv4] %>
<%  }
  end
%>
<HOSTNAME>.            IN     A <IP-ADDRESS>

ev.
<%= sys.hostname %> IN A <%= sys.ipv4 %>
or
<%= sys[:hostname] %> IN A <%= sys[:ipv4] %>

Microsoft DiskPart

DISKPART> list disk
DISKPART> select disk <nr>
DISKPART> detail disk
DISKPART> select partition <nr>
DISKPART> detail partition
DISKPART> select volume <nr>
DISKPART> detail volume

DISKPART> list disk
DISKPART> select disk <nr>
DISKPART> detail disk
DISKPART> clean
DISKPART> create partition primary
DISKPART> active
DISKPART> format fs=fat32 label=Win7 quick
DISKPART> assign
Microsoft DiskPart-Version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
Auf Computer: BACHI-PC

DISKPART> list disk

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
  Datenträger 0    Online          465 GB      0 B
  Datenträger 1    Online          931 GB   368 GB
  Datenträger 2    Online           14 GB      0 B

DISKPART> select disk 2

Datenträger 2 ist jetzt der gewählte Datenträger.

DISKPART> detail disk

SanDisk Ultra USB Device
Datenträger-ID                      : "00000000"
Typ                                 : "USB"
Status                              : "Online"
Pfad                                : "0"
Ziel                                : "0"
LUN-ID                              : "0"
Speicherortpfad                     : "UNAVAILABLE"
Aktueller schreibgeschützter Zustand: Nein
Schreibgeschützt                    : Nein
Startdatenträger                    : Nein
Auslagerungsdatei-Datenträger       : Nein
Ruhezustandsdatei-Datenträger       : Nein
Absturzabbild-Datenträger           : Nein
Clusterdatenträger                  : Nein

  Volume ###  Bst  Bezeichnung  DS     Typ         Größe    Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 6     H                FAT32  Wechselmed    14 GB  Fehlerfre

DISKPART> select volume 6

Volume 6 ist jetzt das gewählte Volume.

DISKPART> detail volume

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
* Datenträger 2    Online           14 GB      0 B

Nur Lesen                      : Nein
Ausgeblendet                   : Nein
Kein Standardlaufwerkbuchstabe : Nein
Schattenkopie                  : Nein
Offline                        : Nein
BitLocker-verschlüsselt        : Nein
Installierbar                  : "Nein"

Volumekapazität                :   14 GB
Freier Speicherplatz auf Volume:   13 GB

BIND: HOWTO Close an Open DNS

BIND 9.9.7
BIND 9.9.5

Book: ZyTrax Pro DNS and BIND

Time-to-Live (TTL) Values
Start of Authority Resource Record (SOA)
BIND Time formats
IPv6 Address Record (AAAA)
HOWTO Close an Open DNS
DNS BIND Query Statements
DNS Configuration Types
DNS Sample BIND Configurations
$ORIGIN, @ and blank Substitution
DNS BIND9 logging Clause

    #s = seconds = # x 1 seconds (really!)
    #m = minutes = # x 60 seconds
    #h = hours = # x 3600 seconds
    #d = day = # x 86400 seconds
    #w = week = # x 604800 seconds

Problems

nslookup not found in FreeBSD 10

# pkg install bind-tools

May you please add alias for nslookup?
FreeBSD 10 sysinstall, nslookup

named: the working directory is not writable

# chown -R bind:bind /var/named/etc/namedb

named: the working directory is not writable

open: /usr/local/etc/rndc.key: file not found

# rndc-confgen -a

Bind does not provide /etc/rndc.key

Stopping named: rndc failed, trying killall: .


Die Verwendung von rndc
Using rndc
Stopping named: rndc failed, trying killall: .

rndc: ‘stats’ failed: permission denied

options {
    dump-file       "/var/named/dump/named_dump.db";
    statistics-file "/var/named/stats/named.stats";
};

rndc works, but rndc stats doesnt
rndc dumpdb could not open dump file

Howto

DNS-Request

- autoritativ (der Server holt die Daten aus einer lokalen Zonendatei)
- nicht-autoritativ
  o rekursiv (der Server holt die Daten von einem anderen Nameserver)
  o iterativ (der Server antwortet mit einem oder mehreren Verweisen
              oder einem Resource Record auf andere Nameserver)

Rekursive und iterative Namensauflösung

recursion
If yes, and a DNS query requests recursion, then the server will attempt to do all the work required to answer the query. If recursion is off and the server does not already know the answer, it will return a referral response. The default is yes. Note that setting recursion no does not prevent clients from getting data from the server’s cache; it only prevents new data from being cached as an effect of client queries. Caching may still occur as an effect the server’s internal operation, such as NOTIFY address lookups. See also fetch-glue above.

fetch-glue
This option is obsolete. In BIND 8, fetch-glue yes caused the server to attempt to fetch glue resource records it didn’t have when constructing the additional data section of a response. This is now considered a bad idea and BIND 9 never does it.

BIND 9 Configuration Reference

Configuring an Authoritative-Only Name Server

Problem
You want to configure an “authoritative-only” or nonrecursive name server.
Cooking with DNS & BIND

Wireshark

(dns) && (dns.qry.type == 1)   => Record type A
$ tcpdump -s 1500 -p 53 -w output.pcap
-s <number>   number in bytes per packet
-w <file>     output file
-p <number>   port number (ex. 53 = DNS)

List of DNS record types

Fail2Ban

Fail2Ban
DNS Root Query Amplification with Fail2Ban
Fail2Ban with FreeBSD
Integrating PF with Fail2ban 0.9

Tutorials

A Nonrecursive Name Server, O’Reilly DNS and BIND
How to Disable External DNS recursion?
Configuring Bind Non Recursive
Wikipedia: Rekursive und iterative Namensauflösung
What is a “recursive DNS query”?

# /usr/sbin/named -t /var/named -u bind -fg
-t chroot() to directory after processing the command line arguments
-u setuid() to user after completing privileged operations
-f Run the server in the foreground
-g Run the server in the foreground and force all logging to stderr
recursion  no;

# /usr/sbin/named -t /var/named -u bind -fg
05-Aug-2013 19:58:10.872 starting
05-Aug-2013 19:58:10.876 listening on IPv4 interface em0, 1.2.3.4#53
05-Aug-2013 19:58:10.877 listening on IPv4 interface lo0, 127.0.0.1#53
05-Aug-2013 19:58:10.880 running
05-Aug-2013 19:59:11.360 unexpected RCODE (REFUSED) resolving 'www.XXX.ch/A/IN': 1.2.3.4#53
05-Aug-2013 19:59:13.359 lame server resolving 'blog.XXX.net' (in 'XXX.net'?): 1.118.193.3#53
05-Aug-2013 19:59:13.359 lame server resolving 'blog.XXX.net' (in 'XXX.net'?): 2.134.128.59#53
05-Aug-2013 19:59:13.360 lame server resolving 'blog.XXX.net' (in 'XXX.net'?): 2.134.128.59#53
05-Aug-2013 19:59:13.361 lame server resolving 'blog.XXX.net' (in 'XXX.net'?): 1.118.193.3#53

05-Aug-2013 20:00:22.718 shutting down
05-Aug-2013 20:00:22.719 no longer listening on 1.2.3.4#53
05-Aug-2013 20:00:22.719 no longer listening on 127.0.0.1#53
05-Aug-2013 20:00:22.720 exiting
# /usr/local/sbin/named -t /var/named -u bind -fg -c /etc/namedb/named.conf
29-Sep-2015 20:16:29.117 starting BIND x.x.x. -t /var/named -u bind -fg -c /etc/namedb/named.conf
29-Sep-2015 20:16:29.117 found 2 CPUs, using 2 worker threads
29-Sep-2015 20:16:29.117 using 2 UDP listeners per interface
29-Sep-2015 20:16:29.120 using up to 4096 sockets
29-Sep-2015 20:16:29.137 ENGINE_by_id failed (crypto failure)
29-Sep-2015 20:16:29.138 error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
29-Sep-2015 20:16:29.138 error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
29-Sep-2015 20:16:29.138 error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:417:id=gost
29-Sep-2015 20:16:29.140 initializing DST: crypto failure
29-Sep-2015 20:16:29.140 exiting (due to fatal error)

# /usr/local/sbin/named -u bind -fg -c /etc/namedb/named.conf
29-Sep-2015 20:16:51.826 starting BIND x.x.x -u bind -fg -c /etc/namedb/named.conf
29-Sep-2015 20:16:51.826 found 2 CPUs, using 2 worker threads
29-Sep-2015 20:16:51.826 using 2 UDP listeners per interface
29-Sep-2015 20:16:51.829 using up to 4096 sockets
29-Sep-2015 20:16:51.853 loading configuration from '/etc/namedb/named.conf'
29-Sep-2015 20:16:51.855 using default UDP/IPv4 port range: [49152, 65535]
29-Sep-2015 20:16:51.855 using default UDP/IPv6 port range: [49152, 65535]
29-Sep-2015 20:16:51.856 listening on IPv4 interface em0, 195.134.157.20#53
29-Sep-2015 20:16:51.858 listening on IPv4 interface lo0, 127.0.0.1#53
[...]
29-Sep-2015 20:16:51.891 command channel listening on 127.0.0.1#953
29-Sep-2015 20:16:51.891 not using config file logging statement for logging due to -g option
29-Sep-2015 20:16:51.892 managed-keys-zone: loaded serial 0
29-Sep-2015 20:16:51.893 redirect-zone: loaded serial 2014060401
29-Sep-2015 20:16:51.907 zone 157.x.x.in-addr.arpa/IN: loaded serial 2007020101
29-Sep-2015 20:16:51.912 zone xxx.ch/IN: loaded serial 2007020101
29-Sep-2015 20:16:51.929 zone yyy.ch/IN: loaded serial 2007020101
29-Sep-2015 20:16:51.930 all zones loaded
29-Sep-2015 20:16:51.933 running

What is the meaning of these BIND log messages?

  • “unexpected RCODE (SERVFAIL)…”
  • “lame server resolving…”
allow-recursion { 127.0.0.1; };

05-Aug-2013 20:05:39.820 starting
05-Aug-2013 20:05:39.824 loading configuration from '/etc/namedb/named.conf'
05-Aug-2013 20:05:39.825 listening on IPv4 interface em0, 1.2.3.4#53
05-Aug-2013 20:05:39.825 listening on IPv4 interface lo0, 127.0.0.1#53
05-Aug-2013 20:05:39.830 zone 0.0.127.in-addr.arpa/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.832 zone AAA.ch/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.833 zone BBB.ch/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.833 zone CCC.ch/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.834 zone DDD.ch/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.835 zone localhost/IN: loaded serial 2007020101
05-Aug-2013 20:05:39.837 running
05-Aug-2013 20:05:39.837 zone localhost/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 zone AAA.ch/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 zone BBB.net/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 zone CCC.net/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 zone DDD.net/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 2007020101)
05-Aug-2013 20:05:39.838 client 1.2.3.4#56328: received notify for zone 'localhost'
05-Aug-2013 20:05:40.339 client 1.2.3.4#56328: received notify for zone 'AAA.ch'
05-Aug-2013 20:05:40.339 client 1.2.3.4#56328: received notify for zone 'BBB.net'
05-Aug-2013 20:05:40.340 client 1.2.3.4#56328: received notify for zone 'CCC.net'
05-Aug-2013 20:05:40.340 client 1.2.3.4#56328: received notify for zone 'DDD.net'
05-Aug-2013 20:05:40.840 client 1.2.3.4#56328: received notify for zone '0.0.127.in-addr.arpa'

05-Aug-2013 20:09:10.348 shutting down
05-Aug-2013 20:09:10.348 no longer listening on 1.2.3.4#53
05-Aug-2013 20:09:10.348 no longer listening on 127.0.0.1#53
05-Aug-2013 20:09:10.350 exiting

How to setup Local Authoritative DNS
BIND 10: Authoritative DNS Server

Git: Staging Area aka “index”

  • Working Tree
  • Index / Stage / Staging Area / Cache
  • Repository

The Staging Area (also called the “index”) is where Git remembers which changes are marked to be committed. If a change is not “staged” it will not be committed. A change can be as granular as a single changed line in a file, leading to very precise commits. If, after staging a change, you decide you don’t want that change to go into the next commit, you can also “unstage” it.

Stage file: $ git add
Unstage file: $ git reset HEAD

Git Basics – Undoing Things

Removing untracked files from your git working copy
$ git clean -f

git-clean
Removing untracked files from your git working copy

Ubuntu: Add new PPA (Personal Package Archive) repository

PPA = Personal Package Archives
Repository = A collection of software you can download quickly and easily.

Personal Package Archives for everyone!

Add Repository

$ sudo add-apt-repository ppa:vala-team
$ sudo add-apt-repository ppa:irie/blender   ==>   https://launchpad.net/~irie/+archive/blender
$ sudo apt-get update
$ sudo apt-get install [...]

Remove Repository

$ sudo add-apt-repository --remove ppa:vala-team

How can PPAs be removed?

Show current version of package

$ apt-cache policy blender
blender:
  Installed: 2.66a-3ubuntu2
  Candidate: 2.70+git201403201745.dfa5ced-0irie1~saucy1
  Version table:
     2.70+git201403201745.dfa5ced-0irie1~saucy1 0
        500 http://ppa.launchpad.net/irie/blender/ubuntu/ saucy/main i386 Packages
 *** 2.66a-3ubuntu2 0
        500 http://mirror.switch.ch/ftp/mirror/ubuntu/ saucy/universe i386 Packages
        100 /var/lib/dpkg/status

How to check the version before install packages using apt-get
Check package version using apt-get/aptitude?