Accessing 3G via Ethernet

Home Forums MultiConnect OCG Accessing 3G via Ethernet

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2785
    Rashan
    Participant

    I’ve read a couple topics and I’m not sure they are the solution I want..

    I want to be able to access cellular 3G internet via the Ethernet port. How do I go about establishing this? I am very new to development on this device (1 week) and I don’t want to change the wrong configurations.

    Thank you.

    #4226
    Bryan Tran
    Moderator

    Hi Rashan,

    I assumed you want to have a PC sitting behind the OCG and want to access to the internet via the OCG device from the PC.

    Basic set up is as follow:

    Notes: You can connect the ethernet port on the OCG to your PC machine and then ssh into the OCG to do the steps below.

    a. You need to know your model number along with the device port for your OCG, and then modify the file /etc/ppp/options to include this info.

    http://www.multitech.net/developer/products/multiconnect-ocg/hardware/multiconnect-ocg-d/accessing-hardware-interfaces/

    Note: Under Select tty device option, comment everything out other than your device port. And leave other stuff as is.

    b. You then need to modify either gsm_chat or cdma_chat file at /etc/ppp/peers/ depend on what modem you have (gsm or cdma modem)

    http://www.multitech.net/developer/products/multiconnect-ocg/applications/ppp-peers/

    Notes:

    i. For the gsm, you need to modify the apn only.

    AT+CGDCONT=1,”IP”,”internet” <–Only need to change “internet” to your apn. Your service provider should give you this info.

    ii. For the cdma, you do not need to do anything, as the default file is fine.

    c. Finally, issuing the command: pppd call gsm

    Or: pppd call cdma (Depend on what modem you have).

    d. Once connected, you can issue a ping to the internet:

    http://www.google.com

    If you are getting a reply then it is good to go.

    e. You then can setup a gateway IP address and DNS ip address on the PC. Bring up your web browser on the PC and you should be able to access the internet.

    f. If you still can not get it to work, I suggest go to http://www.multitech.com -> support and open up a ticket for further help.

    Regards,

    BT

    #4228
    Rashan
    Participant

    Thanks Bryan,

    I can follow everything perfectly until step e.

    Which IP address is the IP address i should use as the gateway? The address associated with eth0 correct? This doesnt connect me to the internet from the pc when i set it up as the gateway.

    I also looked over this article:

    http://www.multitech.net/developer/products/multiconnect-ocg/applications/ppp-masq/

    It also did not work for me. All I want for now is to be able to connect Ethernet port from the modem to a PC and access the internet.

    #4229
    Bryan Tran
    Moderator

    Hi Rashan,

    1. Create a new script named: nat_enable.sh on your OCG and put these commands in:

    #BT – Allow to have multiple PCs access the internet and allow forwarding rule

    #into our NAT table.

    iptables –table nat –append POSTROUTING –out-interface ppp0 -j MASQUERADE

    iptables –append FORWARD –in-interface eth0 -j ACCEPT

    #BT – Enable packet forwarding

    echo 1 > /proc/sys/net/ipv4/ip_forward

    2. Save it and then type: chmod +x nat_enable.sh

    3. Then type: ./nat_enable.sh

    *Run the nat_enable.sh file.

    Regards,

    BT

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.