I have a mini pc running Linux. It has a 3G modem, wifi modem, runs nodogsplash for the captive portal, hostapd, dnsmasq, web server that gives out data that the user needs.

I have the 3G device for the pc to have an internet connection. I don't want to give out internet to the users connected to my wifi hotspot. This setup works now.

But it gives me a bad User Experience with my web app. When the users are connected to the hotspot, they are disconnected from the internet so they miss out on the chat messages and other notifications that are important.

So We wanted to work this out in two ways.

  1. Check if there is a way for Android and iPhones to be connected to both wifi and mobile internet. And still, route the browser call to the web server I run and other traffic through the mobile hotspot?

  2. Provide internet to the user but limit the speed. I want to control the traffic because I don't want to pay much to the mobile carrier. The image below shows the architecture of my project. I want to know at what step the throttling happens and is it possible to request in step 4 that I want only 30 kbps of speed in my response? enter image description here

1 Answer 1

  1. There is no way to have both connection working (Wi-Fi and mobile internet) on a mobile phone, at least without modifying the firmware
  2. In order to do "traffic shaping", the architecture that you described is correct, and you can implement this by using tc and iptables: you can tag the outgoing traffic with some tag, leaving the internal traffic untagged (or, perhaps, you can tag it with a different tag). Tags happen on mangle table, and you can use iptables to configure it (the target will be MARK).

You can see some examples and documentation here: https://wiki.archlinux.org/index.php/advanced_traffic_control

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .