IP packets have wrong source address

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















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.










share|improve this question



















  • 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











  • linux-ip.net/html/adv-multi-internet.html

    – symcbean
    Sep 25 '16 at 3:47















1















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.










share|improve this question



















  • 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











  • linux-ip.net/html/adv-multi-internet.html

    – symcbean
    Sep 25 '16 at 3:47













1












1








1








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.










share|improve this question
















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.







networking iptables modem lte






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 24 '16 at 22:43









Tomasz

10.2k53068




10.2k53068










asked Aug 20 '13 at 13:58









JamesJames

193311




193311







  • 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











  • linux-ip.net/html/adv-multi-internet.html

    – symcbean
    Sep 25 '16 at 3:47












  • 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











  • linux-ip.net/html/adv-multi-internet.html

    – symcbean
    Sep 25 '16 at 3:47







1




1





Can you capture the packets with tcpdump or wireshark?

– ott--
Aug 20 '13 at 14:22





Can you capture the packets with tcpdump or wireshark?

– ott--
Aug 20 '13 at 14:22




1




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





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













linux-ip.net/html/adv-multi-internet.html

– symcbean
Sep 25 '16 at 3:47





linux-ip.net/html/adv-multi-internet.html

– symcbean
Sep 25 '16 at 3:47










2 Answers
2






active

oldest

votes


















0














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 ...






share|improve this answer






























    0














    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?



    e.g.



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


    and



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





    share|improve this answer
























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f87446%2fip-packets-have-wrong-source-address%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      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 ...






      share|improve this answer



























        0














        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 ...






        share|improve this answer

























          0












          0








          0







          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 ...






          share|improve this answer













          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 ...







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 20 '13 at 14:43









          BananguinBananguin

          5,4151340




          5,4151340























              0














              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?



              e.g.



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


              and



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





              share|improve this answer





























                0














                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?



                e.g.



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


                and



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





                share|improve this answer



























                  0












                  0








                  0







                  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?



                  e.g.



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


                  and



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





                  share|improve this answer















                  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?



                  e.g.



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


                  and



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






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 24 '16 at 22:43









                  Tomasz

                  10.2k53068




                  10.2k53068










                  answered Aug 20 '13 at 17:12









                  ShimiShimi

                  31425




                  31425



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f87446%2fip-packets-have-wrong-source-address%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown






                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay