As the title says, can i connect to internet through 3g dongle in ubuntu server fresh installation Any terminal / manual way? My purpose is to get connection using dongle in ubuntu server minimal install and i don't have any other device to connect to.

Any input is appreciated, Thank you.

  • Does Ubuntu detect your dongle as modem? May 19, 2013 at 3:04
  • ya i think as tty0 May 19, 2013 at 17:00

2 Answers 2


There is an answer here on how to connect via mobile broadband using the network manager through the terminal: How to enable/disable mobile broadband from terminal?.

Network manager doesn't come with Ubuntu server as most server installs just have static IPs set on startup by configuration in /etc/networking/interfaces so you'll have to install it.

However, I am questioning why you would do this. I assume you are installing Ubuntu server to actually run a server that can be accessed from the web. Since most if not all mobile broadband providers run carrier-grade NAT, you will not have a publicly routable address under your control and thus no one will be able to access your server.



  1. Create a new file named "12d1:1526" in the folder "/etc/usb_modeswitch.d" and fill it with this content:

    # Vodafone K3772 (Huawei)
    TargetVendor=  0x19d2
    #TargetProduct= not known yet
  2. Duplicate one of the existing Huawei lines in "/lib/udev/rules.d/40-usb_modeswitch.rules" and edit the new line to reflect the product ID of your device (... ATTRS{idProduct}=="1526" ...). It's easy, just look at the other lines.

  3. Now, plug your modem in and wait at least 10 seconds. After this run the lsusb command in a terminal program. There should be a device ID starting with "12d1" but most likely different than "12d1:1526". The changed part of the ID (after the colon) is your new "TargetProduct" value (prepended by "0x"). Edit your config file accordingly, removing the comment sign (hash) at the start of the TargetProduct line.

  4. Unplug the modem and plug again. Wait ... (Huawei modems need up to 10 seconds for the mode switch.) Run dmesg in a terminal program and you should see something like "GSM modem (1-port) converter now attached to ttyUSBx". This means that your modem is ready to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.