Mikrotik Router port forward

In this instruction we will  forward  3389 TCP port to local Server address 192.168.1.200

1) Go to IP -> Firewall -> NAT

2) Click the  RED “+” to add a new NAT rule. Set the “Chain” to “dstnat”, “Protocol” to “tcp”, and “Dst. Port” to “3999”. Set the “In. Interface” to your WAN port. ( In Interface  is IMPORTANT).

how-to-port-forward-in-mikrotik-routor-2

3) Click the “Action” tab, change the “Action” value to “dst-nat”, the “To Addresses” to “192.168.1.200” and “To Ports” to “3999”.

how-to-port-forward-in-mikrotik-routor-3

4) Click APPLY

Done  all  traffic comes from internet on port  3389 will forward to local server  192.168.1.200 on same port

P.S.

For Asterisk  you should forward:

5060 UDP — as  SIP (signaling )

10000-20000 UDP  -as RTP (voice traffic)

If you need  extra services:

22 TCP – as  SSH

80 TCP -as  HTTP

 

 

How to fix DRBD recovery from split brain

In this article i will show U how to solve DRBD split brain error.

Problem
DRBD does not connect between server

#/proc/drbd
version: 8.4.0 (api:1/proto:86-100)
GIT-hash: 28753f559ab51b549d16bcf487fe625d5919c49c build by gardner@, 2011-12-1
2 23:52:00
0: cs:StandAlone ro:Secondary/Unknown ds:UpToDate/DUnknown   r—–
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:76

#log message on the node1
Mar  7 15:38:05 node1 kernel: block drbd0: Split-Brain detected but unresolved, dropping connection!

#/proc/drbd on the node2
version: 8.4.0 (api:1/proto:86-100)
GIT-hash: 28753f559ab51b549d16bcf487fe625d5919c49c build by gardner@, 2011-12-1
2 23:52:00
0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r—–
ns:0 nr:0 dw:144 dr:4205 al:5 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:100

Solution:
Step 1: Define one node as secondary and discard data on this (all = resource name )

drbdadm secondary all
drbdadm disconnect all
drbdadm — –discard-my-data connect all

Step 2: Define anoher node as primary and connect

drbdadm primary all
drbdadm disconnect all
drbdadm connect all

Asterisk13 installation

We will install asterisk13 with pjproject bounled  on a CentOS 6.x x64 as it is recommended from Asterisk developers.

you can also use this installation for Webrtc config.

First lets update all packages:

yum -y update

Then we will install all necessary packages and add epel repository please read comments while the text.

Some optional packages already included.

#epel repositiry installation
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install nano

# WARNING check that selinux is disabled in /etc/sysconfig/selinux
#need to reboot after changes selinux file
yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel
yum install wget gcc gcc-c++ ncurses-devel libxml2-devel sqlite-devel libuuid-devel openssl-devel libsrtp-devel

#install mysql http php and ODBC connector (optional)
yum install mysql-server httd mysql-connector-odbc php mysql php
yum install svn htop sngrep wget mysql-devel jansson-devel git patch autoconf

#get last asterisk and install it
cd /usr/src/ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xzf asterisk-13-current.tar.gz
cd asterisk-13*

#support mp3
contrib/scripts/get_mp3_source.sh
#configure and installation servises
./configure –with-pjproject-bundled –libdir=/usr/lib64
make menuselect
make
make install
make samples
make config
make install-logrotate

#start services
/etc/init.d/mysqld start
/etc/init.d/asterisk start
/etc/init.

CALL ME
+