OpenVPN how to use multiple config files












0















Hi is there any way to change config files when I first time want to connect to one server and second time I want to connect to another server?



Or the only way is to create some .bat file to copy the right config files to folder every time I will need to change the destination server?



I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



If someone have a better idea so tell me.



Thank you for replies.










share|improve this question





























    0















    Hi is there any way to change config files when I first time want to connect to one server and second time I want to connect to another server?



    Or the only way is to create some .bat file to copy the right config files to folder every time I will need to change the destination server?



    I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



    If someone have a better idea so tell me.



    Thank you for replies.










    share|improve this question



























      0












      0








      0








      Hi is there any way to change config files when I first time want to connect to one server and second time I want to connect to another server?



      Or the only way is to create some .bat file to copy the right config files to folder every time I will need to change the destination server?



      I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



      If someone have a better idea so tell me.



      Thank you for replies.










      share|improve this question
















      Hi is there any way to change config files when I first time want to connect to one server and second time I want to connect to another server?



      Or the only way is to create some .bat file to copy the right config files to folder every time I will need to change the destination server?



      I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



      If someone have a better idea so tell me.



      Thank you for replies.







      openvpn connection






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 21 at 9:51







      Adam Beran

















      asked Jan 21 at 8:19









      Adam BeranAdam Beran

      13




      13






















          3 Answers
          3






          active

          oldest

          votes


















          0














          To do exactly what you describe you would need some kind of batch file. There are a few alternatives though -




          1. You can have multiple config files and specify the one (or ones) you want to run using the --config option. If you want to run multiple configs simultaneously you might need to specify different lport values in each depending on how good your NAT is.


          2. You can have multiple "remote" options which the server will try in order that they appear (if you need redundancy)


          3. If you can control DNS, you should be able to specify a subdomain with multiple A ( maybe even CNAME) records. If you specify this subdomain as the remote, it will randomly pick a host. If you do this you should run low TTLs to prevent a record being cached.







          share|improve this answer

































            0














            Solution is to rename ca.crt file and edit config file = you can insert more ca.crt files and .ovpn into one folder and then the application allows you to choose between .ovpn files where you want to connect.






            share|improve this answer































              -1














              I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



              If someone have a better idea so tell me.






              share|improve this answer
























              • This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                – davidgo
                Jan 21 at 9:14











              • I cannot delete this.

                – Adam Beran
                Jan 21 at 9:51











              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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%2fsuperuser.com%2fquestions%2f1396515%2fopenvpn-how-to-use-multiple-config-files%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              To do exactly what you describe you would need some kind of batch file. There are a few alternatives though -




              1. You can have multiple config files and specify the one (or ones) you want to run using the --config option. If you want to run multiple configs simultaneously you might need to specify different lport values in each depending on how good your NAT is.


              2. You can have multiple "remote" options which the server will try in order that they appear (if you need redundancy)


              3. If you can control DNS, you should be able to specify a subdomain with multiple A ( maybe even CNAME) records. If you specify this subdomain as the remote, it will randomly pick a host. If you do this you should run low TTLs to prevent a record being cached.







              share|improve this answer






























                0














                To do exactly what you describe you would need some kind of batch file. There are a few alternatives though -




                1. You can have multiple config files and specify the one (or ones) you want to run using the --config option. If you want to run multiple configs simultaneously you might need to specify different lport values in each depending on how good your NAT is.


                2. You can have multiple "remote" options which the server will try in order that they appear (if you need redundancy)


                3. If you can control DNS, you should be able to specify a subdomain with multiple A ( maybe even CNAME) records. If you specify this subdomain as the remote, it will randomly pick a host. If you do this you should run low TTLs to prevent a record being cached.







                share|improve this answer




























                  0












                  0








                  0







                  To do exactly what you describe you would need some kind of batch file. There are a few alternatives though -




                  1. You can have multiple config files and specify the one (or ones) you want to run using the --config option. If you want to run multiple configs simultaneously you might need to specify different lport values in each depending on how good your NAT is.


                  2. You can have multiple "remote" options which the server will try in order that they appear (if you need redundancy)


                  3. If you can control DNS, you should be able to specify a subdomain with multiple A ( maybe even CNAME) records. If you specify this subdomain as the remote, it will randomly pick a host. If you do this you should run low TTLs to prevent a record being cached.







                  share|improve this answer















                  To do exactly what you describe you would need some kind of batch file. There are a few alternatives though -




                  1. You can have multiple config files and specify the one (or ones) you want to run using the --config option. If you want to run multiple configs simultaneously you might need to specify different lport values in each depending on how good your NAT is.


                  2. You can have multiple "remote" options which the server will try in order that they appear (if you need redundancy)


                  3. If you can control DNS, you should be able to specify a subdomain with multiple A ( maybe even CNAME) records. If you specify this subdomain as the remote, it will randomly pick a host. If you do this you should run low TTLs to prevent a record being cached.








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 21 at 12:25









                  Ahmed Ashour

                  1,3621716




                  1,3621716










                  answered Jan 21 at 8:35









                  davidgodavidgo

                  44.3k75292




                  44.3k75292

























                      0














                      Solution is to rename ca.crt file and edit config file = you can insert more ca.crt files and .ovpn into one folder and then the application allows you to choose between .ovpn files where you want to connect.






                      share|improve this answer




























                        0














                        Solution is to rename ca.crt file and edit config file = you can insert more ca.crt files and .ovpn into one folder and then the application allows you to choose between .ovpn files where you want to connect.






                        share|improve this answer


























                          0












                          0








                          0







                          Solution is to rename ca.crt file and edit config file = you can insert more ca.crt files and .ovpn into one folder and then the application allows you to choose between .ovpn files where you want to connect.






                          share|improve this answer













                          Solution is to rename ca.crt file and edit config file = you can insert more ca.crt files and .ovpn into one folder and then the application allows you to choose between .ovpn files where you want to connect.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 23 at 8:16









                          Adam BeranAdam Beran

                          13




                          13























                              -1














                              I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



                              If someone have a better idea so tell me.






                              share|improve this answer
























                              • This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                                – davidgo
                                Jan 21 at 9:14











                              • I cannot delete this.

                                – Adam Beran
                                Jan 21 at 9:51
















                              -1














                              I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



                              If someone have a better idea so tell me.






                              share|improve this answer
























                              • This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                                – davidgo
                                Jan 21 at 9:14











                              • I cannot delete this.

                                – Adam Beran
                                Jan 21 at 9:51














                              -1












                              -1








                              -1







                              I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



                              If someone have a better idea so tell me.






                              share|improve this answer













                              I think that the easiest way will be make .bat file with rm dir and xcopy new dir with right config files I want to at all.



                              If someone have a better idea so tell me.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jan 21 at 9:04









                              Adam BeranAdam Beran

                              13




                              13













                              • This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                                – davidgo
                                Jan 21 at 9:14











                              • I cannot delete this.

                                – Adam Beran
                                Jan 21 at 9:51



















                              • This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                                – davidgo
                                Jan 21 at 9:14











                              • I cannot delete this.

                                – Adam Beran
                                Jan 21 at 9:51

















                              This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                              – davidgo
                              Jan 21 at 9:14





                              This is, jnfortunately not an answer to your question, so adding it as such is inappropriate. A nore appropriate way is to leave a comment or, as you may not have the rep, possibly edit your question.

                              – davidgo
                              Jan 21 at 9:14













                              I cannot delete this.

                              – Adam Beran
                              Jan 21 at 9:51





                              I cannot delete this.

                              – Adam Beran
                              Jan 21 at 9:51


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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%2fsuperuser.com%2fquestions%2f1396515%2fopenvpn-how-to-use-multiple-config-files%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

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]