How to setup FortiGate to use 3G USB mobile internet modem as the WAN connection

This is a repost of a post from an old blog, made on August 10, 2012, that used to be on:

Original post

I was setting up a FortiGate device today to use a 3G modem as an Internet connection instead of a standard WAN interface so here is a little tutorial how to do it.

I was using:

  • FortiGate 50B device with FortiOS v4.0,build0320,110419 (MR2 Patch 6)
  • Huawei Mobile Connect E169 HSDPA USB stick with a SIM card for a Vodafone Mobile Connect services

Configuration steps:

  • connect the modem in the USB port on the FortiGate device and enable the modem with the following command:
    config system modem
        set status enable
  • Detect the custom vendor and product ID of the USB modem with the following command:
    diagnose sys modem wireless-id

    you should get something like this:
    vendor: 0x12d1, product: 0x1003, registered: yes

    0x12d1 is the vendor ID for the Huawei, and 0x1003 is the product ID for Huawei E169, for Huawei E367a the product ID should be 0x1446 and for Huawei E367b 0x1506

  • Configure your modem interface with the following commands:
    config system modem
        set status enable
        set pin-init "at+cpin=YOUR_SIM_CARD_PIN#"
        set auto-dial enable
        set wireless-custom-vendor-id 0x12d1 (HUAWEI ID)
        set wireless-custom-product-id 0x1003 (E169 ID)
        set phone1 "*99***1#"(VODAFONE NUMBER)
        set extra-init1 "at+cgdcont=1,\"ip\",\" APN)\""
  • Dial the modem with:
    execute modem dial

If you are using the web interface of your FortiGate device, when you enable the modem interface you will get Modem option under System > Network section on the left side menu. You can set up some of the options, like phone or Extra Initialization String there too. Also you can condial or hang-up your 3g connection from there too.

These are the pages I referenced when I was setting up my modem connection:

Blue squares and bars when connected with remote desktop

This is a repost of a post from an old blog, made on February 18, 2013, that used to be on:

Original post:

Sometimes when you connect to the remote machine using a remote desktop connection you might get blue or black bars, stripes, squares or boxes on the white spaces of the screen of the remote machine. This issue is more often on thin client then other machines.


This issue can be resolved by disabling bitmap caching on the RDP client machine.


Bitmap caching is by default enabled for all remote desktop connections and it is used for enhancing the user experience on slow links by storing the often used images locally on the client machine.

Remote Desktop Licensing Error

This is a repost of a post from an old blog, made on February 29, 2012, that used to be on:

Original post:

Today I got a call from client that he can’t connect to his Terminal Server from his Windows XP client.

He would get following error:

The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.

Since I was sure the licensing was in order I searched for another possible problems.

The cause of the problem was in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.

So here is one of possible solutions if you are getting this error when trying to connect to Terminal Server (Be sure to backup your registry before you do this or export the MSLicensing keys, in case this isn’t the cause of your problems):

  1. Open registry editor (Start > Run > regedit)
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ and find MSLicensing folder
  3. Right click on it and select delete
  4. Start Remote Desktop Client (Start>Run>mstsc) as local administrator to rebuild the deleted keys

Iif you are getting some other type of licensing error or if this doesn’t work for you try looking to for some other possible solutions.

YUM fails in clean CentOS 7 install, Exiting on user cancel

If you are installing CentOS 7, you might get an issue with yum update exiting, when it starts downloading packages with the message  Exiting on user cancel even though you haven’t pressed any key, or did anything else that might have cancelled the process.

This seems to be a known bug on Red Hat Enterprise Linux / CentOS 7.1, but it happened on version 7.0.1406 for me.

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

After running yum update it would connect to repository any resolve all the dependencies, and list all the packages that need to be updated, but once you would confirm the download, it would initiate download of packages, and then failed with the message indicating that the process was interrupted from keyboard.

Transaction Summary
Install    8 Packages (+6 Dependent packages)
Upgrade  202 Packages

Total size: 203 M
Total download size: 194 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 75, in 
  File "/usr/libexec/urlgrabber-ext-down", line 61, in main
    fo = PyCurlFileObject(opts.url, opts.filename, opts)
  File "/usr/lib/python2.7/site-packages/urlgrabber/", line 1258, in __init__
  File "/usr/lib/python2.7/site-packages/urlgrabber/", line 1589, in _do_open
  File "/usr/lib/python2.7/site-packages/urlgrabber/", line 1723, in _do_grab
  File "/usr/lib/python2.7/site-packages/urlgrabber/", line 1517, in _do_perform
    raise KeyboardInterrupt

Exiting on user cancel

After running bash -c 'yum clean metadata && yum upgrade' as suggested on CentOS forums, yum has downloaded all the packages, and upgraded to latest CentOS version

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Alternate solution

Another possible solution, to this might be to edit /usr/lib/python2.7/site-packages/urlgrabber/ file, and change the line number 1510 as below:

Change “elif errcode in (42, 55, 56):” to “elif errcode == 42:”

How to install MySQL through YaST

This is a repost of a post from an old blog, made on January 9, 2012, that used to be on:

Original post:

I was looking into Novell Service Desk as solution for our Help-desk department today, so i decided to test it by installing it on a single machine together with a MySQL server to act as its database. It’s been a few years since the last time I installed MySQL, last few years I’m mostly working with Informix and MS SQL.

I just wanted it installed as soon as possible so I decided to install the it through YaST thinking it would be faster, but neglected the fact that YaST scatters the installation through several directories so I spend some time locating the files. So this are the short instructions for those who decided to do it with YaST. I was installing on SUSE Linux Enterprise Server 11 SP1

  1. Open YaST(just type yast in terminal)>Software>Software management(use Tab button to move between sections), or go straight to Install Software on main menu if you’re working through GUI
  2. In the search filed type mysql and press Enter or Search
  3. Select mysql package, mysql-client will be selected also automatically also, and press Accept to install them.
    (mysql user and mysql group will be created automatically, so you don’t need to do that)If you want to find out where did YaST installed all the files, you can do that either through the terminal with rpm -qal mysql command, or if you’re working through the GUI by opening YaST, typing mysql i search box and selecting mysql package. On the File List tab you can see where all the files are installed.

  4. Edit the /etc/my.cnf file, by adding user=mysql after the [mysqld]
    your file should look something like this:

     user = mysql
  5. Crate a mysql database with the following command:
    /usr/bin/mysql_install_db –user=mysql
  6. Start your server with:
    /usr/bin/mysqld_safe –user=mysql &
  7. Check if the server is running with:
    /usr/bin/mysqladmin version
    You should get information about the software version.
  8. Connect to your MySQL server with:
    /usr/bin/mysql -u root
    You should get the mysql> prompt if everything is okay.


There are other ways to install MySQL besides YaST, if you would like to install MySQL from source you can check this blog

%d bloggers like this: