Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

Arhivă blog

duminică, 8 octombrie 2017

samba 4 security=share is deprecated

To work in share mode just add two lines in smb4.conf

security = user
map to guest = Bad User
The remote user name will be compared to the one found in the samba 
password database and if it doesn't find a match it will be tagged a 
"Bad User" and mapped to the guest account.

miercuri, 6 septembrie 2017

clear mail queue in qmail without using qmail-remove

To view messages from qmail you can simply type:
/var/qmail/bin/qmail-qread

 To clean all messages:

Stop qmail service

find /var/qmail/queue/mess -type f -exec rm {} \;
find /var/qmail/queue/info -type f -exec rm {} \;
find /var/qmail/queue/local -type f -exec rm {} \;
find /var/qmail/queue/intd -type f -exec rm {} \;
find /var/qmail/queue/todo -type f -exec rm {} \;
find /var/qmail/queue/remote -type f -exec rm {} \;

Start qmail service

marți, 27 iunie 2017

Microtik show processes

just type in router console /tool profile

sâmbătă, 24 iunie 2017

CentOS not recognise multicast traffic ?

To correct this we need to change kernel variables.


echo 2 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 2 > /proc/sys/net/ipv4/conf/eth1/rp_filter
echo 2 > /proc/sys/net/ipv4/conf/eth2/rp_filter


of modify /etc/sysctl.conf

# Controls source route verification (previously 1)
net.ipv4.conf.default.rp_filter = 2

marți, 20 iunie 2017

Freebsd disable cron email notification

# crontab -e
It will open your crob job file with your default editor. If you want to stop emails for all commands, simply remove the first email line. To stop email for certain command, append ‘> null’ to that command.

ex: 45 2 1 * *   cron/cronmonthly will be: 45 2 1 * *   cron/cronmonthly > null

vineri, 9 iunie 2017

Add border to a layer in GIMP

Layer->Transparency->Alpha To Selection (note that I enlarged the canvas size to hold the entire inset layer)
Select->Border -- enter a value twice the size you want for your white border
Layer->Transparency->Intersect with Selection
Edit->Fill With BG Color -- BG should be white
Select->None
Filters->Light And Shadow->Drop Shadow

vineri, 2 iunie 2017

Qmail Archiving Incoming and Outgoing Emails Directly


In addition to delivering the messages to their respective user mailboxes, it is recommended to have Qmail send a copy of all emails to an archiving mailbox when archiving incoming and outgoing emails directly. This requires certain changes to be made before compiling the Qmail source code. The following guide is an adapted version of the article "Life with Qmail FAQ":

Step1. edit extra.h

QUEUE_EXTRA is a compile-time configuration variable that specifies an additional recipient that will be added to every delivery. This is used primarily for logging; the FAQ describes how to use QUEUE_EXTRA to keep copies of all incoming and outgoing messages.
To use QUEUE_EXTRA, edit extra.h specifying the additional recipient in the format Trecipient\0, and the length of the QUEUE_EXTRA string in QUEUE_EXTRALEN (the "\0" counts as one character). For example:
 #define QUEUE_EXTRA "Tmailstore\0"
 #define QUEUE_EXTRALEN 11
 
Step2. recompile qmail 
 
In this case you will receive a copy of all mails in recipient@domain.com
 
Source

duminică, 2 aprilie 2017

Freebsd NAT with natd

To activate natd support you need to compile Kernel with following option:

options IPDIVERT

After that we can need to run at startup:
natd -interface rl1 (rl1 is my external interface)
/sbin/ipfw add 7 divert natd all from any to any via rl1 (this rule make nat to all internat packets)

7 is the number of rule.

If you have a internal routed subnet you can make nat without this.
/sbin/ipfw add 7 divert natd all from not A.B.C.D/29 to any via rl1


vineri, 10 februarie 2017

VirtualBox under console (VBoxManage)

I need to have virtual machines in servers without GUI. In this case I must configure virtual machines only with VBoxManage utility.

In first step i make/install MV under GUI version of VirtualBox and after that copy on guest server.
After that we need to register virtual machine.

vboxmanage registervm /path-to/vbox file

and start
VBoxManage startvm "Test" --type headless

When we need to shutdown virtual machine:
VBoxManage controlvm "Test" acpipowerbutton
or
VBoxManage controlvm "Test" poweroff

To view some information about virtual machine:
vboxmanage showvminfo /opt/vm/Test/Test.vbox

When we need to modify number of CPU. Stop virtual machine and afler that:
VBoxManage modifyvm "Test" --cpuhotplug on
VBoxManage modifyvm "Test" --cpus 4

To modify memory:
VBoxManage modifyvm "Test" --memory 4096

To delete network interface:
VBoxManage modifyvm "fbsd" --nic1 none

To add bridged interface:
VBoxManage modifyvm fbsd --nic1 bridged --bridgeadapter1 em1

To modify IP address
only if you have vboxguestadditions installed
# VBoxManage guestproperty get "Test" "/VirtualBox/GuestInfo/Net/0/V4/IP"
No value set!
# VBoxManage guestproperty set "Test" "/VirtualBox/GuestInfo/Net/0/V4/IP" 192.168.101.215
# VBoxManage guestproperty get "Test" "/VirtualBox/GuestInfo/Net/0/V4/IP"
Value: 192.168.101.215
# VBoxManage guestproperty get "Test" "/VirtualBox/GuestInfo/Net/0/V4/Netmask"
No value set!
# VBoxManage guestproperty set "Test" "/VirtualBox/GuestInfo/Net/0/V4/Netmask" 255.255.255.0
# VBoxManage guestproperty get "Test" "/VirtualBox/GuestInfo/Net/0/V4/Netmask"
Value: 255.255.255.0
# VBoxManage guestproperty get "Test" "/VirtualBox/GuestInfo/Net/0/V4/Gateway"
No value set!8
# VBoxManage guestproperty set "Test" "/VirtualBox/GuestInfo/Net/0/V4/Gateway" 192.168.101.1


To add virtual machine in bridge with network interfcace:
VBoxManage controlvm "Test" nic1 bridged em1


When we have this error:
==================
Waiting for VM "Test" to power on...  VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
===================
 must enable Virtualisation Technology in BIOS.


To view all os types supported by VBoxManasge
VBoxManage list ostypes (guest)

A short example: VBoxManage modifyvm "vm" --ostype Linux24_64

If you have following error:
This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot – please use a kernel appropriate for your CPU

Just enable:
VBoxManage modifyvm "vm" --longmode on

To make a screenshot via console:
VBoxManage controlvm "vm" screenshotpng screen-shot-dev-006.png

Other posibile problems:

If you have:

# VBoxManage startvm "vm"
VBoxManage: error: Invalid frontend name: 'GUI/Qt'

can try

vboxmanage startvm vm --type headless
Waiting for VM "vm" to power on...

or if you have 

vboxmanage startvm vm --type headless
Waiting for VM "vm" to power on...
VBoxManage: error: Failed to open/create the internal network 'HostInterfaceNetworking-bce0' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
VBoxManage: error: Failed to attach the network LUN (VERR_SUPDRV_COMPONENT_NOT_FOUND)

you can try:

load module vboxnetflt

In my case:

kldload vboxnetflt
root@# kldstat
Id Refs Address            Size     Name
 1   14 0xffffffff80200000 17bc680  kernel
 2    2 0xffffffff819bd000 7b9a8    vboxdrv.ko
 3    1 0xffffffff81c11000 29d86    vboxguest.ko
 4    1 0xffffffff81c3b000 358d     ums.ko
 5    1 0xffffffff81c3f000 2a02     vboxnetflt.ko
 6    2 0xffffffff81c42000 ba02     netgraph.ko
 7    1 0xffffffff81c4e000 4123     ng_ether.ko

root@# vboxmanage startvm vm --type headless
Waiting for VM "vm" to power on...
VM "vm" has been successfully started.
root@#

Mapping Ports

VBoxManage setextradata "vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP 
VBoxManage setextradata "vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22 
VBoxManage setextradata "vm" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222

If you install phpVirtualBox and have problems with login steps you can try to start virtualserver manually in verbose mode.

 vboxwebsrv -v

If you have error VBOX_E_INVALID_VM_STATE

you can try: VBoxManage startvm "vm" --type emergencystop
and start the virtual machine again.

sâmbătă, 4 februarie 2017

Linux bridge not forward multicast traffic

As it turns out, it's a bug in the igmp snooping code in the kernel that's
the problem with multicast traffic not being forwarded.

This seems to affect recent versions. To check if it's turned on, run
cat /sys/devices/virtual/net//bridge/multicast_snooping

If it's 1, it's highly this is the culprit causing the non-propagation of
the multicast traffic. The solution is to turn it off by setting it 0.


In my case:

echo 0 > /sys/devices/virtual/net/br0/bridge/multicast_snooping

Source

Map


Visitor Map