Is there a better way to allow my WPF app to connect to AWS RDS than individually whitelisting IPs in...












0















I have a WPF app that connects to AWS RDS SQL Server Express database and every time I am connecting from a new IP I have log in to AWS and add an inbound rule to allow MS SQL to connect to my new IP. I just keep whitelisting new IPs.



It seems cumbersome and perhaps not secure, and allowing "connect from anywhere" seems even less secure. Is there a way so my app could always connect, securely, without perpetually adding new IPs to the security groups?



I've done a lot of Googling and security seems like a dense topic - sorry if this has been asked, I tried searching for it here but don't know exactly what I'm looking for.



To give context, my app allows various CRM APIs to interact with each other and the SQL Server database stores settings and credentials, so it's imperative that it be secure










share|improve this question

























  • Why your IP keeps changing? Are you switching between networks?

    – Chetan Ranpariya
    Jan 2 at 3:50
















0















I have a WPF app that connects to AWS RDS SQL Server Express database and every time I am connecting from a new IP I have log in to AWS and add an inbound rule to allow MS SQL to connect to my new IP. I just keep whitelisting new IPs.



It seems cumbersome and perhaps not secure, and allowing "connect from anywhere" seems even less secure. Is there a way so my app could always connect, securely, without perpetually adding new IPs to the security groups?



I've done a lot of Googling and security seems like a dense topic - sorry if this has been asked, I tried searching for it here but don't know exactly what I'm looking for.



To give context, my app allows various CRM APIs to interact with each other and the SQL Server database stores settings and credentials, so it's imperative that it be secure










share|improve this question

























  • Why your IP keeps changing? Are you switching between networks?

    – Chetan Ranpariya
    Jan 2 at 3:50














0












0








0








I have a WPF app that connects to AWS RDS SQL Server Express database and every time I am connecting from a new IP I have log in to AWS and add an inbound rule to allow MS SQL to connect to my new IP. I just keep whitelisting new IPs.



It seems cumbersome and perhaps not secure, and allowing "connect from anywhere" seems even less secure. Is there a way so my app could always connect, securely, without perpetually adding new IPs to the security groups?



I've done a lot of Googling and security seems like a dense topic - sorry if this has been asked, I tried searching for it here but don't know exactly what I'm looking for.



To give context, my app allows various CRM APIs to interact with each other and the SQL Server database stores settings and credentials, so it's imperative that it be secure










share|improve this question
















I have a WPF app that connects to AWS RDS SQL Server Express database and every time I am connecting from a new IP I have log in to AWS and add an inbound rule to allow MS SQL to connect to my new IP. I just keep whitelisting new IPs.



It seems cumbersome and perhaps not secure, and allowing "connect from anywhere" seems even less secure. Is there a way so my app could always connect, securely, without perpetually adding new IPs to the security groups?



I've done a lot of Googling and security seems like a dense topic - sorry if this has been asked, I tried searching for it here but don't know exactly what I'm looking for.



To give context, my app allows various CRM APIs to interact with each other and the SQL Server database stores settings and credentials, so it's imperative that it be secure







c# wpf passwords aws-api-gateway amazon-rds






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 3:58









John Rotenstein

75.6k785137




75.6k785137










asked Jan 2 at 3:14









user6291867user6291867

1716




1716













  • Why your IP keeps changing? Are you switching between networks?

    – Chetan Ranpariya
    Jan 2 at 3:50



















  • Why your IP keeps changing? Are you switching between networks?

    – Chetan Ranpariya
    Jan 2 at 3:50

















Why your IP keeps changing? Are you switching between networks?

– Chetan Ranpariya
Jan 2 at 3:50





Why your IP keeps changing? Are you switching between networks?

– Chetan Ranpariya
Jan 2 at 3:50












1 Answer
1






active

oldest

votes


















1














You can automate the process of adding a Security Group rule, such as:



IP=`curl -s http://whatismyip.akamai.com/`
aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --profile class --output text


Just be careful because there is a limit on the number of rules in a Security Group.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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%2fstackoverflow.com%2fquestions%2f54000829%2fis-there-a-better-way-to-allow-my-wpf-app-to-connect-to-aws-rds-than-individuall%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You can automate the process of adding a Security Group rule, such as:



    IP=`curl -s http://whatismyip.akamai.com/`
    aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --profile class --output text


    Just be careful because there is a limit on the number of rules in a Security Group.






    share|improve this answer




























      1














      You can automate the process of adding a Security Group rule, such as:



      IP=`curl -s http://whatismyip.akamai.com/`
      aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --profile class --output text


      Just be careful because there is a limit on the number of rules in a Security Group.






      share|improve this answer


























        1












        1








        1







        You can automate the process of adding a Security Group rule, such as:



        IP=`curl -s http://whatismyip.akamai.com/`
        aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --profile class --output text


        Just be careful because there is a limit on the number of rules in a Security Group.






        share|improve this answer













        You can automate the process of adding a Security Group rule, such as:



        IP=`curl -s http://whatismyip.akamai.com/`
        aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --profile class --output text


        Just be careful because there is a limit on the number of rules in a Security Group.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 2 at 4:00









        John RotensteinJohn Rotenstein

        75.6k785137




        75.6k785137
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f54000829%2fis-there-a-better-way-to-allow-my-wpf-app-to-connect-to-aws-rds-than-individuall%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

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith