Why should I allow multiple IP addresses on a website for a single session?Allow traffic from single IP address, block all other addressesScanning website for vulnerablitiesWhat statistics app should I use for my website?Why should I firewall servers?SSL Certificates: Multiple Single Domain vs Wildcard?What permissions should my website files/folders have on a Linux webserver?Why should I start to replace Windows Server 2003?Why should you disable network login for local accounts?Allow ssh access on single Ethernet portSharing single page application for multiple customers

Write a function

Publishing papers seem natural to many, while I find it really hard to think novel stuff to pursue till publication. How to cope up with this?

What is the relationship between external and internal composition in a cartesian closed category?

Four ships at the ocean with the same distance

Gaining Proficiency in Vehicles (water)

Is "wissen" the only verb in German to have an irregular present tense?

run bash scripts in folder all at the same time

Decrease spacing between a bullet point and its subbullet point

How to evaluate the performance of open source solver?

What kind of Chinook helicopter/airplane hybrid is this?

Why did Old English lose both thorn and eth?

Category-theoretic treatment of diffs, patches and merging?

Why do people prefer metropolitan areas, considering monsters and villains?

Can the word "desk" be used as a verb?

How to understand flavors and when to use combination of them?

Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?

How should I ask for a "pint" in countries that use metric?

Chilling water in copper vessel

How do I separate enchants from items?

Clarinets in the Rite of Spring

Compute Manhattan distance from origin given a set of left-right-step directions

What term do you use for someone who acts impulsively?

How do resistors generate different heat if we make the current fixed and changed the voltage and resistance? Notice the flow of charge is constant

What is the meaning of "prairie-dog" in this sentence?



Why should I allow multiple IP addresses on a website for a single session?


Allow traffic from single IP address, block all other addressesScanning website for vulnerablitiesWhat statistics app should I use for my website?Why should I firewall servers?SSL Certificates: Multiple Single Domain vs Wildcard?What permissions should my website files/folders have on a Linux webserver?Why should I start to replace Windows Server 2003?Why should you disable network login for local accounts?Allow ssh access on single Ethernet portSharing single page application for multiple customers






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








16















I hope my question matches the scope of this site.



I'm developing a CMS. Currently my logged in users are locked to their IP address for the session. Unfortunately a small portion of my userbase constantly jump between two or more IP addresses. Most of them probably use load balancers. Technically it is not necessary to lock the users sessions to one IP address. I did not expect clients to switch between multiple IP addresses for a single page request on my website.



I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?










share|improve this question



















  • 39





    You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

    – whatsisname
    Jun 28 at 16:08






  • 13





    Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

    – marcelm
    Jun 28 at 18:43












  • intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

    – Tom H
    Jun 28 at 23:29






  • 1





    If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

    – Bakuriu
    Jun 29 at 11:16






  • 1





    @TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

    – Navin
    Jul 1 at 5:47

















16















I hope my question matches the scope of this site.



I'm developing a CMS. Currently my logged in users are locked to their IP address for the session. Unfortunately a small portion of my userbase constantly jump between two or more IP addresses. Most of them probably use load balancers. Technically it is not necessary to lock the users sessions to one IP address. I did not expect clients to switch between multiple IP addresses for a single page request on my website.



I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?










share|improve this question



















  • 39





    You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

    – whatsisname
    Jun 28 at 16:08






  • 13





    Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

    – marcelm
    Jun 28 at 18:43












  • intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

    – Tom H
    Jun 28 at 23:29






  • 1





    If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

    – Bakuriu
    Jun 29 at 11:16






  • 1





    @TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

    – Navin
    Jul 1 at 5:47













16












16








16


1






I hope my question matches the scope of this site.



I'm developing a CMS. Currently my logged in users are locked to their IP address for the session. Unfortunately a small portion of my userbase constantly jump between two or more IP addresses. Most of them probably use load balancers. Technically it is not necessary to lock the users sessions to one IP address. I did not expect clients to switch between multiple IP addresses for a single page request on my website.



I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?










share|improve this question
















I hope my question matches the scope of this site.



I'm developing a CMS. Currently my logged in users are locked to their IP address for the session. Unfortunately a small portion of my userbase constantly jump between two or more IP addresses. Most of them probably use load balancers. Technically it is not necessary to lock the users sessions to one IP address. I did not expect clients to switch between multiple IP addresses for a single page request on my website.



I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?







security






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 29 at 10:01









Peter Mortensen

2,1664 gold badges22 silver badges24 bronze badges




2,1664 gold badges22 silver badges24 bronze badges










asked Jun 28 at 7:43









yoruyoru

811 silver badge4 bronze badges




811 silver badge4 bronze badges







  • 39





    You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

    – whatsisname
    Jun 28 at 16:08






  • 13





    Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

    – marcelm
    Jun 28 at 18:43












  • intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

    – Tom H
    Jun 28 at 23:29






  • 1





    If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

    – Bakuriu
    Jun 29 at 11:16






  • 1





    @TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

    – Navin
    Jul 1 at 5:47












  • 39





    You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

    – whatsisname
    Jun 28 at 16:08






  • 13





    Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

    – marcelm
    Jun 28 at 18:43












  • intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

    – Tom H
    Jun 28 at 23:29






  • 1





    If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

    – Bakuriu
    Jun 29 at 11:16






  • 1





    @TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

    – Navin
    Jul 1 at 5:47







39




39





You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

– whatsisname
Jun 28 at 16:08





You don't even need load balancers to jump around IPs. Connect on your phone on the subway, you might get a different IP every few minutes as the train travels, and then again when your phone switches to WiFi at a destination.

– whatsisname
Jun 28 at 16:08




13




13





Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

– marcelm
Jun 28 at 18:43






Also for laptops moving between locations (say, home > work > starbucks). Also: IPv6 random addresses (IPv6 SLAAC privacy extensions).

– marcelm
Jun 28 at 18:43














intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

– Tom H
Jun 28 at 23:29





intuitively, I would expect the client jumping around on different source Ips to cause problems if it was anything more than "occasionally".

– Tom H
Jun 28 at 23:29




1




1





If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

– Bakuriu
Jun 29 at 11:16





If you are developing a webapp that will be installed in a network that you control or you have knowledge of you may decide to do this for security since you might be able to say "in this situation multiple IPs are not going to happen since users must access this from their WS and there are no load balancers or other stuff in between that may change their IP"... in that case you might even be able to track the users IPs since their WS may always have the same one (or it might change only once every couple of months)

– Bakuriu
Jun 29 at 11:16




1




1





@TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

– Navin
Jul 1 at 5:47





@TomH No, the vast majority of webapps don't care about your IP address, they will accept the same cookies in an HTTP request over a new TCP connection. Only demented and badly designed crap locks your session to an IP or a connection.

– Navin
Jul 1 at 5:47










4 Answers
4






active

oldest

votes


















35















a small portion of my userbase constantly jump between two or more IP addresses.




Causes



Assuming that your users aren't actively trying to hide their real IP addresses by using an anonymising service...:



Most corporate examples I have seen are caused by larger companies and some ISP's using a cluster of proxy servers, each with a different external IP-address, with user requests getting load balanced over that cluster.



You may see Dual Stack users making requests over both IPv4 and IPv6 and switching between the two protocols RFC 8305 for subsequent requests.



The other scenario is when I'm at the extreme range of a Wi-Fi access point and my device "randomly" switches between Wi-Fi and cellular data.



Solutions



In the first scenario you might compromise on keeping such IP address "security" in your sessions by only considering the first three octets, as typically such a cluster of proxy servers are all within a small subnet and will have neighboring IP addresses.



In the second and third scenario you will see completely different client IP addresses, from unrelated providers even.



Don't tie you sessions to a specific IP address, that is more likely to break user experience than to provide actual improved security.






share|improve this answer




















  • 27





    Nobody ties sessions to IP addresses anymore, for exactly these reasons.

    – Michael Hampton
    Jun 28 at 9:05






  • 32





    NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

    – bjoster
    Jun 28 at 9:19






  • 6





    In addition to all, Multipath TCP is getting increasingly common.

    – Can Poyrazoğlu
    Jun 29 at 8:08






  • 2





    If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

    – Ferrybig
    Jun 29 at 8:54






  • 5





    @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

    – Ferrybig
    Jun 29 at 8:57


















8















I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?




The primary risk is a malicious user hijacking the session. If you could lock down to one or a small set of IP addresses, you could block users from entirely different IP addresses from hijacking the session.



The problem is that some users do this legitimately. Whether they are using a load balanced proxy or are at the margins of two wireless access points (or whatever), they use multiple IP addresses. So you pretty much have to allow it for those users. And it's hard to tell which users require multiple IP addresses except when they request from multiple IP addresses.



One way to reduce the impact of this is to use HTTPS. Then the malicious actor has to have a way to compromise the secure layer as well as the session cookie. Over an insecure connection, the malicious actor could just use network inspection to compromise a session cookie. But over HTTPS, the same malicious actor needs to have access to one of the ends of the conversation. And if the malicious actor has that, then it's not necessary to use a different IP.



TL;DR: you should generally allow requests from different IP addresses for the same user. There are legitimate reasons this can happen. Use HTTPS instead to protect from that class of exploits.






share|improve this answer






























    4















    what are the risks in allowing my clients to constantly jump between IP addresses for a page request




    From a security standpoint - zero risks.



    Now, from a practical standpoint. It means you cannot use certain types of algorithms for either security or DoS protection.



    A simple way to throttle user requests is to track by IP address. Since this doesn't need to interact with your application server you can use services at lower levels to do this. Software like Apache's mod_evasive do this. You can still use these techniques, but user changing IP addresses will reduce their effectiveness. Then again, users will switch IP addresses anyway so these techniques have never really been effective.



    A related, but different, use-case is throttling failed login attempts. This is to prevent brute-force password guessing. But again, there is nothing you can do anyway if users change IP addresses. A really serious hacker would not even use his own machines. He'd just buy some time on a botnet (or use his own previously infected botnet) and connect to your service via 10,000 other people's PCs (IP addresses). This is not really related to limiting user's IP address because it is pre-login, but it's something to keep in mind.






    share|improve this answer
































      0














      There a several reasons why a user may jump to a new IP address.



      1. IPv6 privacy extensions, many IPv6 clients nowadays will jump around within the /64 on the lan.

      2. Load balanced proxies, the clients request gets routed to one of several proxies each with a seperate IP.

      3. NAT pools, the border nat is configured with multiple IP addresses and assigns IP/port combinations from the pool arbitarilly to client TCP connections.

      4. The user moves between different networks or parts of a network, common with phones nowadays.

      5. Dual stack users may hop between IPv4 and IPv6.


      I wonder now, what are the risks in allowing my clients to constantly jump between IPs for a page request




      The advantage of locking client sessoins to IPs is it makes session stealing attacks harder. If an attacker has a mechanism that lets them steal the clients cookies but does not let them make connections to your server from the clients IP address then the IP lock will block them from stealing the session.



      The downside is as you say it will cause breakage for some users who find their session invalidated for no obvious reason.



      Most sites nowadays seem to think the breakage outweighs the benefits of such locking.






      share|improve this answer

























        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "2"
        ;
        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: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        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%2fserverfault.com%2fquestions%2f973205%2fwhy-should-i-allow-multiple-ip-addresses-on-a-website-for-a-single-session%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        35















        a small portion of my userbase constantly jump between two or more IP addresses.




        Causes



        Assuming that your users aren't actively trying to hide their real IP addresses by using an anonymising service...:



        Most corporate examples I have seen are caused by larger companies and some ISP's using a cluster of proxy servers, each with a different external IP-address, with user requests getting load balanced over that cluster.



        You may see Dual Stack users making requests over both IPv4 and IPv6 and switching between the two protocols RFC 8305 for subsequent requests.



        The other scenario is when I'm at the extreme range of a Wi-Fi access point and my device "randomly" switches between Wi-Fi and cellular data.



        Solutions



        In the first scenario you might compromise on keeping such IP address "security" in your sessions by only considering the first three octets, as typically such a cluster of proxy servers are all within a small subnet and will have neighboring IP addresses.



        In the second and third scenario you will see completely different client IP addresses, from unrelated providers even.



        Don't tie you sessions to a specific IP address, that is more likely to break user experience than to provide actual improved security.






        share|improve this answer




















        • 27





          Nobody ties sessions to IP addresses anymore, for exactly these reasons.

          – Michael Hampton
          Jun 28 at 9:05






        • 32





          NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

          – bjoster
          Jun 28 at 9:19






        • 6





          In addition to all, Multipath TCP is getting increasingly common.

          – Can Poyrazoğlu
          Jun 29 at 8:08






        • 2





          If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

          – Ferrybig
          Jun 29 at 8:54






        • 5





          @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

          – Ferrybig
          Jun 29 at 8:57















        35















        a small portion of my userbase constantly jump between two or more IP addresses.




        Causes



        Assuming that your users aren't actively trying to hide their real IP addresses by using an anonymising service...:



        Most corporate examples I have seen are caused by larger companies and some ISP's using a cluster of proxy servers, each with a different external IP-address, with user requests getting load balanced over that cluster.



        You may see Dual Stack users making requests over both IPv4 and IPv6 and switching between the two protocols RFC 8305 for subsequent requests.



        The other scenario is when I'm at the extreme range of a Wi-Fi access point and my device "randomly" switches between Wi-Fi and cellular data.



        Solutions



        In the first scenario you might compromise on keeping such IP address "security" in your sessions by only considering the first three octets, as typically such a cluster of proxy servers are all within a small subnet and will have neighboring IP addresses.



        In the second and third scenario you will see completely different client IP addresses, from unrelated providers even.



        Don't tie you sessions to a specific IP address, that is more likely to break user experience than to provide actual improved security.






        share|improve this answer




















        • 27





          Nobody ties sessions to IP addresses anymore, for exactly these reasons.

          – Michael Hampton
          Jun 28 at 9:05






        • 32





          NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

          – bjoster
          Jun 28 at 9:19






        • 6





          In addition to all, Multipath TCP is getting increasingly common.

          – Can Poyrazoğlu
          Jun 29 at 8:08






        • 2





          If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

          – Ferrybig
          Jun 29 at 8:54






        • 5





          @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

          – Ferrybig
          Jun 29 at 8:57













        35












        35








        35








        a small portion of my userbase constantly jump between two or more IP addresses.




        Causes



        Assuming that your users aren't actively trying to hide their real IP addresses by using an anonymising service...:



        Most corporate examples I have seen are caused by larger companies and some ISP's using a cluster of proxy servers, each with a different external IP-address, with user requests getting load balanced over that cluster.



        You may see Dual Stack users making requests over both IPv4 and IPv6 and switching between the two protocols RFC 8305 for subsequent requests.



        The other scenario is when I'm at the extreme range of a Wi-Fi access point and my device "randomly" switches between Wi-Fi and cellular data.



        Solutions



        In the first scenario you might compromise on keeping such IP address "security" in your sessions by only considering the first three octets, as typically such a cluster of proxy servers are all within a small subnet and will have neighboring IP addresses.



        In the second and third scenario you will see completely different client IP addresses, from unrelated providers even.



        Don't tie you sessions to a specific IP address, that is more likely to break user experience than to provide actual improved security.






        share|improve this answer
















        a small portion of my userbase constantly jump between two or more IP addresses.




        Causes



        Assuming that your users aren't actively trying to hide their real IP addresses by using an anonymising service...:



        Most corporate examples I have seen are caused by larger companies and some ISP's using a cluster of proxy servers, each with a different external IP-address, with user requests getting load balanced over that cluster.



        You may see Dual Stack users making requests over both IPv4 and IPv6 and switching between the two protocols RFC 8305 for subsequent requests.



        The other scenario is when I'm at the extreme range of a Wi-Fi access point and my device "randomly" switches between Wi-Fi and cellular data.



        Solutions



        In the first scenario you might compromise on keeping such IP address "security" in your sessions by only considering the first three octets, as typically such a cluster of proxy servers are all within a small subnet and will have neighboring IP addresses.



        In the second and third scenario you will see completely different client IP addresses, from unrelated providers even.



        Don't tie you sessions to a specific IP address, that is more likely to break user experience than to provide actual improved security.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 29 at 10:04









        Peter Mortensen

        2,1664 gold badges22 silver badges24 bronze badges




        2,1664 gold badges22 silver badges24 bronze badges










        answered Jun 28 at 8:44









        HBruijnHBruijn

        60k12 gold badges94 silver badges161 bronze badges




        60k12 gold badges94 silver badges161 bronze badges







        • 27





          Nobody ties sessions to IP addresses anymore, for exactly these reasons.

          – Michael Hampton
          Jun 28 at 9:05






        • 32





          NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

          – bjoster
          Jun 28 at 9:19






        • 6





          In addition to all, Multipath TCP is getting increasingly common.

          – Can Poyrazoğlu
          Jun 29 at 8:08






        • 2





          If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

          – Ferrybig
          Jun 29 at 8:54






        • 5





          @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

          – Ferrybig
          Jun 29 at 8:57












        • 27





          Nobody ties sessions to IP addresses anymore, for exactly these reasons.

          – Michael Hampton
          Jun 28 at 9:05






        • 32





          NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

          – bjoster
          Jun 28 at 9:19






        • 6





          In addition to all, Multipath TCP is getting increasingly common.

          – Can Poyrazoğlu
          Jun 29 at 8:08






        • 2





          If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

          – Ferrybig
          Jun 29 at 8:54






        • 5





          @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

          – Ferrybig
          Jun 29 at 8:57







        27




        27





        Nobody ties sessions to IP addresses anymore, for exactly these reasons.

        – Michael Hampton
        Jun 28 at 9:05





        Nobody ties sessions to IP addresses anymore, for exactly these reasons.

        – Michael Hampton
        Jun 28 at 9:05




        32




        32





        NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

        – bjoster
        Jun 28 at 9:19





        NEVER ever tie sessions to IP-addresses, the 80s are over! My ISP supplys a complete /64 network to my phone in which my browser jumps around like crazy.

        – bjoster
        Jun 28 at 9:19




        6




        6





        In addition to all, Multipath TCP is getting increasingly common.

        – Can Poyrazoğlu
        Jun 29 at 8:08





        In addition to all, Multipath TCP is getting increasingly common.

        – Can Poyrazoğlu
        Jun 29 at 8:08




        2




        2





        If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

        – Ferrybig
        Jun 29 at 8:54





        If you are making your CMS for technical users, you can put a "limit this session to your ip (xxx.yyy.zzz.iii) only" checkbox on the login page

        – Ferrybig
        Jun 29 at 8:54




        5




        5





        @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

        – Ferrybig
        Jun 29 at 8:57





        @bjoster that's because the IPv6 privacy extensions, it keep switching address so websites cannot track you by your ip alone (this is not an issue with IPv4, as multiple people are behind the same address)

        – Ferrybig
        Jun 29 at 8:57













        8















        I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?




        The primary risk is a malicious user hijacking the session. If you could lock down to one or a small set of IP addresses, you could block users from entirely different IP addresses from hijacking the session.



        The problem is that some users do this legitimately. Whether they are using a load balanced proxy or are at the margins of two wireless access points (or whatever), they use multiple IP addresses. So you pretty much have to allow it for those users. And it's hard to tell which users require multiple IP addresses except when they request from multiple IP addresses.



        One way to reduce the impact of this is to use HTTPS. Then the malicious actor has to have a way to compromise the secure layer as well as the session cookie. Over an insecure connection, the malicious actor could just use network inspection to compromise a session cookie. But over HTTPS, the same malicious actor needs to have access to one of the ends of the conversation. And if the malicious actor has that, then it's not necessary to use a different IP.



        TL;DR: you should generally allow requests from different IP addresses for the same user. There are legitimate reasons this can happen. Use HTTPS instead to protect from that class of exploits.






        share|improve this answer



























          8















          I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?




          The primary risk is a malicious user hijacking the session. If you could lock down to one or a small set of IP addresses, you could block users from entirely different IP addresses from hijacking the session.



          The problem is that some users do this legitimately. Whether they are using a load balanced proxy or are at the margins of two wireless access points (or whatever), they use multiple IP addresses. So you pretty much have to allow it for those users. And it's hard to tell which users require multiple IP addresses except when they request from multiple IP addresses.



          One way to reduce the impact of this is to use HTTPS. Then the malicious actor has to have a way to compromise the secure layer as well as the session cookie. Over an insecure connection, the malicious actor could just use network inspection to compromise a session cookie. But over HTTPS, the same malicious actor needs to have access to one of the ends of the conversation. And if the malicious actor has that, then it's not necessary to use a different IP.



          TL;DR: you should generally allow requests from different IP addresses for the same user. There are legitimate reasons this can happen. Use HTTPS instead to protect from that class of exploits.






          share|improve this answer

























            8












            8








            8








            I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?




            The primary risk is a malicious user hijacking the session. If you could lock down to one or a small set of IP addresses, you could block users from entirely different IP addresses from hijacking the session.



            The problem is that some users do this legitimately. Whether they are using a load balanced proxy or are at the margins of two wireless access points (or whatever), they use multiple IP addresses. So you pretty much have to allow it for those users. And it's hard to tell which users require multiple IP addresses except when they request from multiple IP addresses.



            One way to reduce the impact of this is to use HTTPS. Then the malicious actor has to have a way to compromise the secure layer as well as the session cookie. Over an insecure connection, the malicious actor could just use network inspection to compromise a session cookie. But over HTTPS, the same malicious actor needs to have access to one of the ends of the conversation. And if the malicious actor has that, then it's not necessary to use a different IP.



            TL;DR: you should generally allow requests from different IP addresses for the same user. There are legitimate reasons this can happen. Use HTTPS instead to protect from that class of exploits.






            share|improve this answer














            I wonder now, what are the risks in allowing my clients to constantly jump between IP addresses for a page request (for example, CSS files are requested by xxx.xxx.xxx.xxx and JavaScript files are requested by yyy.yyy.yyy.yyy)? Should I generally allow or prohibit that?




            The primary risk is a malicious user hijacking the session. If you could lock down to one or a small set of IP addresses, you could block users from entirely different IP addresses from hijacking the session.



            The problem is that some users do this legitimately. Whether they are using a load balanced proxy or are at the margins of two wireless access points (or whatever), they use multiple IP addresses. So you pretty much have to allow it for those users. And it's hard to tell which users require multiple IP addresses except when they request from multiple IP addresses.



            One way to reduce the impact of this is to use HTTPS. Then the malicious actor has to have a way to compromise the secure layer as well as the session cookie. Over an insecure connection, the malicious actor could just use network inspection to compromise a session cookie. But over HTTPS, the same malicious actor needs to have access to one of the ends of the conversation. And if the malicious actor has that, then it's not necessary to use a different IP.



            TL;DR: you should generally allow requests from different IP addresses for the same user. There are legitimate reasons this can happen. Use HTTPS instead to protect from that class of exploits.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jun 30 at 12:27









            mdfst13mdfst13

            2661 bronze badge




            2661 bronze badge





















                4















                what are the risks in allowing my clients to constantly jump between IP addresses for a page request




                From a security standpoint - zero risks.



                Now, from a practical standpoint. It means you cannot use certain types of algorithms for either security or DoS protection.



                A simple way to throttle user requests is to track by IP address. Since this doesn't need to interact with your application server you can use services at lower levels to do this. Software like Apache's mod_evasive do this. You can still use these techniques, but user changing IP addresses will reduce their effectiveness. Then again, users will switch IP addresses anyway so these techniques have never really been effective.



                A related, but different, use-case is throttling failed login attempts. This is to prevent brute-force password guessing. But again, there is nothing you can do anyway if users change IP addresses. A really serious hacker would not even use his own machines. He'd just buy some time on a botnet (or use his own previously infected botnet) and connect to your service via 10,000 other people's PCs (IP addresses). This is not really related to limiting user's IP address because it is pre-login, but it's something to keep in mind.






                share|improve this answer





























                  4















                  what are the risks in allowing my clients to constantly jump between IP addresses for a page request




                  From a security standpoint - zero risks.



                  Now, from a practical standpoint. It means you cannot use certain types of algorithms for either security or DoS protection.



                  A simple way to throttle user requests is to track by IP address. Since this doesn't need to interact with your application server you can use services at lower levels to do this. Software like Apache's mod_evasive do this. You can still use these techniques, but user changing IP addresses will reduce their effectiveness. Then again, users will switch IP addresses anyway so these techniques have never really been effective.



                  A related, but different, use-case is throttling failed login attempts. This is to prevent brute-force password guessing. But again, there is nothing you can do anyway if users change IP addresses. A really serious hacker would not even use his own machines. He'd just buy some time on a botnet (or use his own previously infected botnet) and connect to your service via 10,000 other people's PCs (IP addresses). This is not really related to limiting user's IP address because it is pre-login, but it's something to keep in mind.






                  share|improve this answer



























                    4












                    4








                    4








                    what are the risks in allowing my clients to constantly jump between IP addresses for a page request




                    From a security standpoint - zero risks.



                    Now, from a practical standpoint. It means you cannot use certain types of algorithms for either security or DoS protection.



                    A simple way to throttle user requests is to track by IP address. Since this doesn't need to interact with your application server you can use services at lower levels to do this. Software like Apache's mod_evasive do this. You can still use these techniques, but user changing IP addresses will reduce their effectiveness. Then again, users will switch IP addresses anyway so these techniques have never really been effective.



                    A related, but different, use-case is throttling failed login attempts. This is to prevent brute-force password guessing. But again, there is nothing you can do anyway if users change IP addresses. A really serious hacker would not even use his own machines. He'd just buy some time on a botnet (or use his own previously infected botnet) and connect to your service via 10,000 other people's PCs (IP addresses). This is not really related to limiting user's IP address because it is pre-login, but it's something to keep in mind.






                    share|improve this answer
















                    what are the risks in allowing my clients to constantly jump between IP addresses for a page request




                    From a security standpoint - zero risks.



                    Now, from a practical standpoint. It means you cannot use certain types of algorithms for either security or DoS protection.



                    A simple way to throttle user requests is to track by IP address. Since this doesn't need to interact with your application server you can use services at lower levels to do this. Software like Apache's mod_evasive do this. You can still use these techniques, but user changing IP addresses will reduce their effectiveness. Then again, users will switch IP addresses anyway so these techniques have never really been effective.



                    A related, but different, use-case is throttling failed login attempts. This is to prevent brute-force password guessing. But again, there is nothing you can do anyway if users change IP addresses. A really serious hacker would not even use his own machines. He'd just buy some time on a botnet (or use his own previously infected botnet) and connect to your service via 10,000 other people's PCs (IP addresses). This is not really related to limiting user's IP address because it is pre-login, but it's something to keep in mind.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jun 29 at 10:08









                    Peter Mortensen

                    2,1664 gold badges22 silver badges24 bronze badges




                    2,1664 gold badges22 silver badges24 bronze badges










                    answered Jun 29 at 5:18









                    slebetmanslebetman

                    1635 bronze badges




                    1635 bronze badges





















                        0














                        There a several reasons why a user may jump to a new IP address.



                        1. IPv6 privacy extensions, many IPv6 clients nowadays will jump around within the /64 on the lan.

                        2. Load balanced proxies, the clients request gets routed to one of several proxies each with a seperate IP.

                        3. NAT pools, the border nat is configured with multiple IP addresses and assigns IP/port combinations from the pool arbitarilly to client TCP connections.

                        4. The user moves between different networks or parts of a network, common with phones nowadays.

                        5. Dual stack users may hop between IPv4 and IPv6.


                        I wonder now, what are the risks in allowing my clients to constantly jump between IPs for a page request




                        The advantage of locking client sessoins to IPs is it makes session stealing attacks harder. If an attacker has a mechanism that lets them steal the clients cookies but does not let them make connections to your server from the clients IP address then the IP lock will block them from stealing the session.



                        The downside is as you say it will cause breakage for some users who find their session invalidated for no obvious reason.



                        Most sites nowadays seem to think the breakage outweighs the benefits of such locking.






                        share|improve this answer



























                          0














                          There a several reasons why a user may jump to a new IP address.



                          1. IPv6 privacy extensions, many IPv6 clients nowadays will jump around within the /64 on the lan.

                          2. Load balanced proxies, the clients request gets routed to one of several proxies each with a seperate IP.

                          3. NAT pools, the border nat is configured with multiple IP addresses and assigns IP/port combinations from the pool arbitarilly to client TCP connections.

                          4. The user moves between different networks or parts of a network, common with phones nowadays.

                          5. Dual stack users may hop between IPv4 and IPv6.


                          I wonder now, what are the risks in allowing my clients to constantly jump between IPs for a page request




                          The advantage of locking client sessoins to IPs is it makes session stealing attacks harder. If an attacker has a mechanism that lets them steal the clients cookies but does not let them make connections to your server from the clients IP address then the IP lock will block them from stealing the session.



                          The downside is as you say it will cause breakage for some users who find their session invalidated for no obvious reason.



                          Most sites nowadays seem to think the breakage outweighs the benefits of such locking.






                          share|improve this answer

























                            0












                            0








                            0







                            There a several reasons why a user may jump to a new IP address.



                            1. IPv6 privacy extensions, many IPv6 clients nowadays will jump around within the /64 on the lan.

                            2. Load balanced proxies, the clients request gets routed to one of several proxies each with a seperate IP.

                            3. NAT pools, the border nat is configured with multiple IP addresses and assigns IP/port combinations from the pool arbitarilly to client TCP connections.

                            4. The user moves between different networks or parts of a network, common with phones nowadays.

                            5. Dual stack users may hop between IPv4 and IPv6.


                            I wonder now, what are the risks in allowing my clients to constantly jump between IPs for a page request




                            The advantage of locking client sessoins to IPs is it makes session stealing attacks harder. If an attacker has a mechanism that lets them steal the clients cookies but does not let them make connections to your server from the clients IP address then the IP lock will block them from stealing the session.



                            The downside is as you say it will cause breakage for some users who find their session invalidated for no obvious reason.



                            Most sites nowadays seem to think the breakage outweighs the benefits of such locking.






                            share|improve this answer













                            There a several reasons why a user may jump to a new IP address.



                            1. IPv6 privacy extensions, many IPv6 clients nowadays will jump around within the /64 on the lan.

                            2. Load balanced proxies, the clients request gets routed to one of several proxies each with a seperate IP.

                            3. NAT pools, the border nat is configured with multiple IP addresses and assigns IP/port combinations from the pool arbitarilly to client TCP connections.

                            4. The user moves between different networks or parts of a network, common with phones nowadays.

                            5. Dual stack users may hop between IPv4 and IPv6.


                            I wonder now, what are the risks in allowing my clients to constantly jump between IPs for a page request




                            The advantage of locking client sessoins to IPs is it makes session stealing attacks harder. If an attacker has a mechanism that lets them steal the clients cookies but does not let them make connections to your server from the clients IP address then the IP lock will block them from stealing the session.



                            The downside is as you say it will cause breakage for some users who find their session invalidated for no obvious reason.



                            Most sites nowadays seem to think the breakage outweighs the benefits of such locking.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jul 1 at 17:52









                            Peter GreenPeter Green

                            3,0416 silver badges25 bronze badges




                            3,0416 silver badges25 bronze badges



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Server Fault!


                                • 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%2fserverfault.com%2fquestions%2f973205%2fwhy-should-i-allow-multiple-ip-addresses-on-a-website-for-a-single-session%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

                                Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                                Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                                Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form