0

I need to submit a custom Remote id when connecting to a IKEv2-VPN created with DotRas but I haven't figured out any way of doing this.

Remote id is submitted, however it's just the IP that is submitted. I need to customize this.

This is the code that creates the connection:

    private void CreateConnection(String connectionName)
    {
        this.rasPhoneBook.Open(PHONEBOOK_PATH);
        RasEntry entry = RasEntry.CreateVpnEntry(connectionName, SERVER_ADDRESS,
            RasVpnStrategy.IkeV2Only,
            RasDevice.Create(connectionName, RasDeviceType.Vpn));
        this.rasPhoneBook.Entries.Add(entry);
    }

And this is where I connect:

    private void Connect()
    {
        // disconnect any lingering connections before connecting
        this.Disconnect();
        this.rasDialer.EntryName = this.serviceNameTextBox.Text;
        this.rasDialer.PhoneBookPath = PHONEBOOK_PATH;
        this.rasDialer.Credentials = new NetworkCredential(this.usernameTextBox.Text, 
            this.passwordTextBox.Text);
        this.rasDialer.DialAsync();
    }

Thanks for any help solving this.

saturnusringar
  • 149
  • 3
  • 13
  • Is this something you ever figured out how to do? I’m not familiar with the use case at all and what it is you’re trying to accomplish though I am curious. – Jeff Winn Mar 14 '19 at 11:19
  • No, I never figured out how to do this. – saturnusringar Mar 16 '19 at 19:59
  • If you’re up for it, I’ve got a new version of DotRas in the works. If it’s something you’re still after, I could always use the help with testing it. My ability to replicate to VPN configurations with this kind of a specialized need isn’t something I have access to. – Jeff Winn Mar 30 '19 at 12:42
  • Sorry for the extremely late reply. I might try the new version later, but as of now I don't have time to change the version. – saturnusringar May 09 '19 at 10:28
  • hello i am working on vpn.. my protocol is IkeV2 but in RasVpnStrategy i don't find IkeV2Only can you please help me how you add this protocol – Muhammad Tufail Jun 01 '20 at 14:11

0 Answers0