Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proplem With L2tp VPN Mikrotik #893

Open
muhanadali100 opened this issue Mar 29, 2024 · 3 comments
Open

Proplem With L2tp VPN Mikrotik #893

muhanadali100 opened this issue Mar 29, 2024 · 3 comments

Comments

@muhanadali100
Copy link

Hello after I update to v12.1

5 minutes after turning on the DNS Server

The l2tp vpn stops working and gives 0Kbps and it's connected normally

After turning off the dns, it returns to work again

This problem occurred only after updating the dns to the latest version

I wanted to know whether this problem was caused by the l2tp vpn or whether there was a dns to treat this condition

Because the dns is currently completely stopped

[2024-03-26 00:15:21 UTC] Logging started. [2024-03-26 00:15:21 UTC] [11.11.11.235:58317] [admin] Forwarder zone was disabled: shahid.mbc.net [2024-03-26 00:15:21 UTC] Saved zone file for domain: shahid.mbc.net [2024-03-26 00:15:32 UTC] [11.11.11.235:58317] [admin] Forwarder zone was enabled: shahid.mbc.net [2024-03-26 00:15:32 UTC] Saved zone file for domain: shahid.mbc.net [2024-03-26 00:25:30 UTC] LogManager cleanup deleted the log file: /etc/dns/logs/2024-03-18.log [2024-03-26 00:26:11 UTC] [11.11.11.235:63203] Check for update was done {updateAvailable: False; updateVersion: 12.1; updateTitle: New Update (v12.1) Available!; updateMessage: Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing this update to know if there are any breaking changes.; instructionsLink: https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html; changeLogLink: https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md;} [2024-03-26 01:08:22 UTC] DnsServerCore.InvalidTokenWebServiceException: Invalid token or session expired. at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 545 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) [2024-03-26 01:08:32 UTC] DNS Server auth config file was saved: /etc/dns/auth.config [2024-03-26 01:09:05 UTC] DnsServerCore.DnsWebServiceException: Invalid username or password for user: admin at DnsServerCore.Auth.AuthManager.CreateSessionAsync(UserSessionType type, String tokenName, String username, String password, IPAddress remoteAddress, String userAgent) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Auth\AuthManager.cs:line 648 at DnsServerCore.WebServiceAuthApi.LoginAsync(HttpContext context, UserSessionType sessionType) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceAuthApi.cs:line 306 at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 597 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) [2024-03-26 01:31:51 UTC] [11.11.11.235:47527] [admin] User logged in. [2024-03-26 01:31:54 UTC] [11.11.11.235:47531] Check for update was done {updateAvailable: False;} System.Net.Http.HttpRequestException: HttpClient could not resolve IP address for host: go.technitium.com ---> TechnitiumLibrary.Net.Dns.DnsClientNoResponseException: DnsClient failed to resolve the request 'go.technitium.com. A IN'. Received a response with RCODE: ServerFailure at TechnitiumLibrary.Net.Dns.DnsClient.ParseResponseA(DnsDatagram response) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 1988 at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 210 --- End of inner exception stack trace --- at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 220 at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at DnsServerCore.WebServiceApi.GetCheckForUpdateJsonData() in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 79 at DnsServerCore.WebServiceApi.CheckForUpdateAsync(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 103 [2024-03-26 01:32:01 UTC] DNS Server auth config file was saved: /etc/dns/auth.config [2024-03-26 01:32:02 UTC] Web Service TLS certificate was loaded: /etc/dns/cert.pfx [2024-03-26 01:32:02 UTC] DNS Server config file was saved: /etc/dns/dns.config [2024-03-26 01:32:02 UTC] [11.11.11.235:47531] [admin] DNS Settings were updated successfully. [2024-03-26 01:44:33 UTC] [11.11.11.235:12657] Check for update was done {updateAvailable: False;} System.Net.Http.HttpRequestException: Network is unreachable (139.59.3.235:443) ---> System.Net.Sockets.SocketException (101): Network is unreachable at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.InternalSendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 99
at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 242
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at DnsServerCore.WebServiceApi.GetCheckForUpdateJsonData() in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 79
at DnsServerCore.WebServiceApi.CheckForUpdateAsync(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 103
[2024-03-26 01:44:55 UTC] [11.11.11.235:12657] [admin] Forwarder zone was disabled: shahid.mbc.net
[2024-03-26 01:44:55 UTC] Saved zone file for domain: shahid.mbc.net
[2024-03-26 01:45:00 UTC] Web Service TLS certificate was loaded: /etc/dns/cert.pfx
[2024-03-26 01:45:00 UTC] DNS Server config file was saved: /etc/dns/dns.config
[2024-03-26 01:45:00 UTC] [11.11.11.235:12657] [admin] DNS Settings were updated successfully.
[2024-03-26 01:54:52 UTC] [11.11.11.235:48194] Check for update was done {updateAvailable: False;}
System.Net.Http.HttpRequestException: Network is unreachable (139.59.3.235:443)
---> System.Net.Sockets.SocketException (101): Network is unreachable
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.InternalSendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 99 at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 242 at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at DnsServerCore.WebServiceApi.GetCheckForUpdateJsonData() in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 79 at DnsServerCore.WebServiceApi.CheckForUpdateAsync(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 103 [2024-03-26 01:55:01 UTC] [11.11.11.235:48194] [admin] Forwarder zone was deleted: shahid.mbc.net [2024-03-26 01:55:01 UTC] Deleted zone file for domain: shahid.mbc.net [2024-03-26 01:55:11 UTC] DNS Server auth config file was saved: /etc/dns/auth.config [2024-03-26 01:57:00 UTC] [11.11.11.235:17157] [admin] Forwarder zone was deleted: ftth.iq [2024-03-26 01:57:00 UTC] Deleted zone file for domain: ftth.iq [2024-03-26 01:57:10 UTC] DNS Server auth config file was saved: /etc/dns/auth.config [2024-03-26 06:19:28 UTC] DnsServerCore.InvalidTokenWebServiceException: Invalid token or session expired. at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 545 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) [2024-03-26 06:19:38 UTC] DNS Server auth config file was saved: /etc/dns/auth.config [2024-03-26 06:19:57 UTC] [11.11.11.235:48956] [admin] User logged in. [2024-03-26 06:19:58 UTC] [11.11.11.235:48978] Check for update was done {updateAvailable: False;} System.Net.Http.HttpRequestException: Network is unreachable (139.59.3.235:443) ---> System.Net.Sockets.SocketException (101): Network is unreachable at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.InternalSendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 99
at TechnitiumLibrary.Net.Http.Client.HttpClientNetworkHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Http\Client\HttpClientNetworkHandler.cs:line 242
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at DnsServerCore.WebServiceApi.GetCheckForUpdateJsonData() in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 79
at DnsServerCore.WebServiceApi.CheckForUpdateAsync(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 103
[2024-03-26 06:20:07 UTC] DNS Server auth config file was saved: /etc/dns/auth.config
[2024-03-26 06:23:14 UTC] [11.11.11.235:48978] [admin] User logged out.
[2024-03-26 06:23:24 UTC] DNS Server auth config file was saved: /etc/dns/auth.config
[2024-03-26 19:37:10 UTC] DNS Server is downloading block list: http://15.15.15.6/update/hosts/hosts.txt
[2024-03-26 19:37:10 UTC] DNS Server successfully checked for a new update of the block list: http://15.15.15.6/update/hosts/hosts.txt
[2024-03-26 19:37:10 UTC] DNS Server config file was saved: /etc/dns/dns.config
[2024-03-27 00:46:00 UTC] Logging stopped.`

@ShreyasZare
Copy link
Member

Thanks for the post. This does not seems to be an issue with DNS server itself. The error logs have System.Net.Sockets.SocketException (101): Network is unreachable which means that the default route on the server is missing. You need to fix that so that the server can access Internet.

Also, you seem to be using public IP addresses on your private network. This too will cause issue with some domain names from resolving if their name servers are in the same IP range that you are using. You need to update your network to use private IP addresses.

@muhanadali100
Copy link
Author

Thanks for the post. This does not seems to be an issue with DNS server itself. The error logs have System.Net.Sockets.SocketException (101): Network is unreachable which means that the default route on the server is missing. You need to fix that so that the server can access Internet.

Also, you seem to be using public IP addresses on your private network. This too will cause issue with some domain names from resolving if their name servers are in the same IP range that you are using. You need to update your network to use private IP addresses.

I cut off the Internet from the dns so that the l2tp works again

@ShreyasZare
Copy link
Member

Thanks for the post. This does not seems to be an issue with DNS server itself. The error logs have System.Net.Sockets.SocketException (101): Network is unreachable which means that the default route on the server is missing. You need to fix that so that the server can access Internet.
Also, you seem to be using public IP addresses on your private network. This too will cause issue with some domain names from resolving if their name servers are in the same IP range that you are using. You need to update your network to use private IP addresses.

I cut off the Internet from the dns so that the l2tp works again

DNS and IP network do not have any direct relation with each other. So, the DNS server should not affect any of you network. It seems to be some kind of config issue causing this which you need to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants