I have two 4G modems connecting to a network and sending and receiving data. There is a problem though, as the modems keep getting kicked off the network because the source IP address of the packets is incorrect. It seems that packets that originate from datacard 1 have the source IP address of datacard 2.

The mobile network checks the source IP address of the packet against the IP address of the connected modem, sees there is a mismatch and kicks that modem off the network.

I need to rectify this problem and have both modems send IP packets with the correct source IP address. However, I'm very inexperienced in this kind of thing, and I would very much appreciate some advice for starting points. I believe that the IP tables and IP route have been checked and that hasn't resolved this problem.

  • 1
    Can you capture the packets with tcpdump or wireshark?
    – ott--
    Aug 20 '13 at 14:22
  • 1
    Sounds like you have two Internet connections. That's a non-trivial configuration, could you post the network config?
    – derobert
    Aug 20 '13 at 14:26

This reads like you use both modem cards concurrently in the same computer to connect twice to the same network. This won't work in most cases. With two equivalent uplinks your OS cannot know which uplink it is supposed to use. If you check your routing table (ip route show) you will probably detect two default routes and/or two routes to the same subnet of your provider. You need to get rid of any ambiguity in your routing table. First approach delete one default route and the corresponting (same interface) route to the provider subnet. This will basically render one of your cards useless, but should solve your connectivity problem.

For more/better help we would need to know what you want to do with your 2 4g cards. One uplink is enough for internet access ...


In addition to what has been said (you mentioned iptables, but not what you did with it)... did you try MASQing the traffic leaving your machine?


iptables -t nat -I POSTROUTING -o 4g-interface-1 -j MASQUERADE


iptables -t nat -I POSTROUTING -o 4g-interface-2 -j MASQUERADE

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.