If my understanding is correct you want to use Sierra Wireless module as USB modem i.e, You want to access the internet on your host PC through the USB port which are received from GPRS on Sierra Wireless module.
Please fallow the below steps/rules to access internet on the host PC through the USB port connect between your PC and Sierra Wireless module.
First setup the static IP address in your Ubuntu PC, open the following file:
You may see a line looking like below:
iface eth0 inet dhcp
Change it to looking below and save the file.
iface usb0 inet static
After adding the above changes and saving, Reboot your ubuntu PC for the above changes to get reflected.
After rebooting the ubuntu PC, Run the below command to set the default GW, Here the 192.168.2.2 is Sierra Wireless module’s IP address.
sudo route add default gw 192.168.2.2 usb0
Run the below rules on the Sierra Wireless module:
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -I POSTROUTING -o rmnet0 -j MASQUERADE
iptables -A FORWARD -o usb0 -i rmnet0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i usb0 -o rmnet0 -j ACCEP
I tried the above steps with WP8548 module, I was able to access the internet on my host PC. I am not sure which module you are using, I think steps should be same for any other module also.