SecureNAT利用時に「NAT DNS セッション」が使われない、「NAT UDP/IP セッション数」を減らしたい

SoftEther VPN に関するご質問はこのフォーラムにお気軽にご投稿ください。
Post Reply
falms
Posts: 2
Joined: Mon May 31, 2021 3:41 pm
Contact:

SecureNAT利用時に「NAT DNS セッション」が使われない、「NAT UDP/IP セッション数」を減らしたい

Post by falms » Tue Jun 01, 2021 5:50 am

SecureNATを設定した仮想HUBにリモートアクセスVPNとしてクライアントを接続した際、
「仮想NATルータの状況」を確認すると、UDP/IPで接続先ポートが53のNATテーブルエントリが多数表示されます。
「SecureNATの動作状況」を確認しても、「NAT DNS セッション数」は0のままであり、「NAT UDP/IP セッション数」が多い傾向にあります。

何かの設定変更などで、「NAT DNS セッション」がカウントされるようにできますでしょうか。どういった状況でカウントされる値なのでしょうか。
クエリと応答の対が判別できるDNSとして認識できれば、UDP/IP セッションの増加は抑えられるのではないかと考えています。


もちろん、NAT UDP/IPセッション数は、UDPセッションタイムアウトの設定値(デフォルト60秒)にしたがって減っていくのですが、
例えばWebブラウザなどで多数の名前解決を行うクライアントが同時に多数(数十程度)VPN接続している場合、
仮想HUBごとのNATエントリ数の上限4096に容易に達するのではないかと懸念しています。

SoftEther VPN Serverを動作させているネットワークの関係上、ローカルブリッジは使わず、SecureNATにしています。
ネットワーク構成上、仮想NATにはUDPのパケットはDNSかDHCPなどしか流さないようにしているため、
現在は暫定の対処として、UDPセッションタイムアウトを15秒にして、セッション数が減るのをはやめています。


サーバ:
CentOS 8.2 - SoftEther VPN Server 4.34, Build 9745
ほか、検証用のWindows 10 20H2でも同様

クライアント:
ChromeOS 90 - 組み込みOpenVPN
iOS 14.6 - 組み込みL2TP/IPsec
Windows 10 20H2 19042.985 - SoftEther VPN Client 4.34, Build 9745
スクリーンショット 2021-06-01 143601.png
10.211.254.254 は仮想ホストのIPアドレスです。デフォルトの 192.168.30.1 から変更していますが、この値に特に意味はありません。
You do not have the required permissions to view the files attached to this post.
Last edited by falms on Tue Jun 01, 2021 11:19 pm, edited 1 time in total.

cedar
Site Admin
Posts: 2066
Joined: Sat Mar 09, 2013 5:37 am

Re: SecureNAT利用時に「NAT DNS セッション」が使われない、「NAT UDP/IP セッション数」を減らしたい

Post by cedar » Tue Jun 01, 2021 10:53 am

クライアントの参照する DNS サーバーは SecureNAT の仮想ホストになっているでしょうか。

falms
Posts: 2
Joined: Mon May 31, 2021 3:41 pm
Contact:

Re: SecureNAT利用時に「NAT DNS セッション」が使われない、「NAT UDP/IP セッション数」を減らしたい

Post by falms » Tue Jun 01, 2021 11:45 pm

返信ありがとうございます。

はい、仮想ホストのIPアドレスをDNSサーバーとして参照しています。
あらためて、仮想ホストのIPアドレス設定まわりを初期値に戻したスクリーンショットを添付いたします。

また、検証用に作成したコンフィグも添付します。
ServerCert,ServerKeyは削除しました。パスワードも今回の検証用の弱いものです。
管理者パスワード:0000
仮想HUB「VPN」の管理パスワード:(未設定)
仮想HUB「VPN」のユーザー名「vpn」のパスワード:0000
基本的には、初期設定時ウィザードのリモートアクセスVPN設定に従い、ローカルブリッジの代わりにSecureNATを有効化したのみの設定です。

今回、この返信で添付したスクリーンショットはいずれも、このコンフィグでの確認時のスクリーンショットです。
ご確認のほど、よろしくお願いいたします。
スクリーンショット 2021-06-02 024717.png
スクリーンショット 2021-06-02 024550.png
スクリーンショット 2021-06-02 024619.png

Code: Select all

# Software Configuration File
# ---------------------------
# 
# You may edit this file when the VPN Server / Client / Bridge program is not running.
# 
# In prior to edit this file manually by your text editor,
# shutdown the VPN Server / Client / Bridge background service.
# Otherwise, all changes will be lost.
# 
declare root
{
	uint ConfigRevision 31
	bool IPsecMessageDisplayed true
	string Region JP
	bool VgsMessageDisplayed false

	declare DDnsClient
	{
		bool Disabled true
	}
	declare IPsec
	{
		bool EtherIP_IPsec false
		string IPsec_Secret vpn
		string L2TP_DefaultHub VPN
		bool L2TP_IPsec true
		bool L2TP_Raw false

		declare EtherIP_IDSettingsList
		{
		}
	}
	declare ListenerList
	{
		declare Listener0
		{
			bool DisableDos false
			bool Enabled true
			uint Port 443
		}
		declare Listener1
		{
			bool DisableDos false
			bool Enabled true
			uint Port 992
		}
		declare Listener2
		{
			bool DisableDos false
			bool Enabled true
			uint Port 1194
		}
		declare Listener3
		{
			bool DisableDos false
			bool Enabled true
			uint Port 5555
		}
	}
	declare LocalBridgeList
	{
		bool EnableSoftEtherKernelModeDriver true
		bool ShowAllInterfaces false
	}
	declare ServerConfiguration
	{
		bool AcceptOnlyTls true
		uint64 AutoDeleteCheckDiskFreeSpaceMin 8589934592
		uint AutoDeleteCheckIntervalSecs 300
		uint AutoSaveConfigSpan 300
		bool BackupConfigOnlyWhenModified true
		string CipherName AES128-SHA
		uint CurrentBuild 9745
		bool DisableCoreDumpOnUnix false
		bool DisableDeadLockCheck false
		bool DisableDosProction false
		bool DisableGetHostNameWhenAcceptTcp false
		bool DisableIntelAesAcceleration false
		bool DisableIPsecAggressiveMode false
		bool DisableIPv6Listener false
		bool DisableJsonRpcWebApi false
		bool DisableNatTraversal false
		bool DisableOpenVPNServer false
		bool DisableSessionReconnect false
		bool DisableSSTPServer false
		bool DontBackupConfig false
		bool EnableVpnOverDns false
		bool EnableVpnOverIcmp false
		byte HashedPassword 8iY762+St18itqoB5Fj2jtVlkPQ=
		string KeepConnectHost keepalive.softether.org
		uint KeepConnectInterval 50
		uint KeepConnectPort 80
		uint KeepConnectProtocol 1
		uint64 LoggerMaxLogSize 1073741823
		uint MaxConcurrentDnsClientThreads 512
		uint MaxConnectionsPerIP 256
		uint MaxUnestablishedConnections 1000
		bool NoDebugDump false
		bool NoHighPriorityProcess false
		bool NoSendSignature false
		string OpenVPNDefaultClientOption dev-type$20tun,link-mtu$201500,tun-mtu$201500,cipher$20AES-128-CBC,auth$20SHA1,keysize$20128,key-method$202,tls-client
		string OpenVPN_UdpPortList 1194
		bool SaveDebugLog false
		uint ServerLogSwitchType 4
		uint ServerType 0
		bool StrictSyslogDatetimeFormat false
		bool Tls_Disable1_0 false
		bool Tls_Disable1_1 false
		bool Tls_Disable1_2 false
		bool Tls_Disable1_3 false
		bool UseKeepConnect true
		bool UseWebTimePage false
		bool UseWebUI false

		declare GlobalParams
		{
			uint FIFO_BUDGET 10240000
			uint HUB_ARP_SEND_INTERVAL 5000
			uint IP_TABLE_EXPIRE_TIME 60000
			uint IP_TABLE_EXPIRE_TIME_DHCP 300000
			uint MAC_TABLE_EXPIRE_TIME 600000
			uint MAX_BUFFERING_PACKET_SIZE 2560000
			uint MAX_HUB_LINKS 1024
			uint MAX_IP_TABLES 65536
			uint MAX_MAC_TABLES 65536
			uint MAX_SEND_SOCKET_QUEUE_NUM 128
			uint MAX_SEND_SOCKET_QUEUE_SIZE 2560000
			uint MAX_STORED_QUEUE_NUM 1024
			uint MEM_FIFO_REALLOC_MEM_SIZE 655360
			uint MIN_SEND_SOCKET_QUEUE_SIZE 320000
			uint QUEUE_BUDGET 2048
			uint SELECT_TIME 256
			uint SELECT_TIME_FOR_NAT 30
			uint STORM_CHECK_SPAN 500
			uint STORM_DISCARD_VALUE_END 1024
			uint STORM_DISCARD_VALUE_START 3
		}
		declare ServerTraffic
		{
			declare RecvTraffic
			{
				uint64 BroadcastBytes 1228004
				uint64 BroadcastCount 17578
				uint64 UnicastBytes 10876265
				uint64 UnicastCount 30946
			}
			declare SendTraffic
			{
				uint64 BroadcastBytes 662668
				uint64 BroadcastCount 7746
				uint64 UnicastBytes 10876139
				uint64 UnicastCount 30959
			}
		}
		declare SyslogSettings
		{
			string HostName $
			uint Port 514
			uint SaveType 0
		}
	}
	declare VirtualHUB
	{
		declare VPN
		{
			uint64 CreatedTime 1622489206406
			byte HashedPassword +WzqGYrR3VYXrAhKPZLGEHcIwO8=
			uint64 LastCommTime 1622537249852
			uint64 LastLoginTime 1622537088479
			uint NumLogin 5
			bool Online true
			bool RadiusConvertAllMsChapv2AuthRequestToEap false
			string RadiusRealm $
			uint RadiusRetryInterval 0
			uint RadiusServerPort 1812
			string RadiusSuffixFilter $
			bool RadiusUsePeapInsteadOfEap false
			byte SecurePassword bpw3X/O5E8a6G6ccnl4uXmDtkwI=
			uint Type 0

			declare AccessList
			{
			}
			declare AdminOption
			{
				uint allow_hub_admin_change_option 0
				uint deny_bridge 0
				uint deny_change_user_password 0
				uint deny_empty_password 0
				uint deny_hub_admin_change_ext_option 0
				uint deny_qos 0
				uint deny_routing 0
				uint max_accesslists 0
				uint max_bitrates_download 0
				uint max_bitrates_upload 0
				uint max_groups 0
				uint max_multilogins_per_user 0
				uint max_sessions 0
				uint max_sessions_bridge 0
				uint max_sessions_client 0
				uint max_sessions_client_bridge_apply 0
				uint max_users 0
				uint no_access_list_include_file 0
				uint no_cascade 0
				uint no_change_access_control_list 0
				uint no_change_access_list 0
				uint no_change_admin_password 0
				uint no_change_cert_list 0
				uint no_change_crl_list 0
				uint no_change_groups 0
				uint no_change_log_config 0
				uint no_change_log_switch_type 0
				uint no_change_msg 0
				uint no_change_users 0
				uint no_delay_jitter_packet_loss 0
				uint no_delete_iptable 0
				uint no_delete_mactable 0
				uint no_disconnect_session 0
				uint no_enum_session 0
				uint no_offline 0
				uint no_online 0
				uint no_query_session 0
				uint no_read_log_file 0
				uint no_securenat 0
				uint no_securenat_enabledhcp 0
				uint no_securenat_enablenat 0
			}
			declare CascadeList
			{
			}
			declare LogSetting
			{
				uint PacketLogSwitchType 4
				uint PACKET_LOG_ARP 0
				uint PACKET_LOG_DHCP 1
				uint PACKET_LOG_ETHERNET 0
				uint PACKET_LOG_ICMP 0
				uint PACKET_LOG_IP 0
				uint PACKET_LOG_TCP 0
				uint PACKET_LOG_TCP_CONN 1
				uint PACKET_LOG_UDP 0
				bool SavePacketLog true
				bool SaveSecurityLog true
				uint SecurityLogSwitchType 4
			}
			declare Message
			{
			}
			declare Option
			{
				uint AccessListIncludeFileCacheLifetime 30
				uint AdjustTcpMssValue 0
				bool ApplyIPv4AccessListOnArpPacket false
				bool AssignVLanIdByRadiusAttribute false
				bool BroadcastLimiterStrictMode false
				uint BroadcastStormDetectionThreshold 0
				uint ClientMinimumRequiredBuild 0
				bool DenyAllRadiusLoginWithNoVlanAssign false
				uint DetectDormantSessionInterval 0
				bool DisableAdjustTcpMss false
				bool DisableCheckMacOnLocalBridge false
				bool DisableCorrectIpOffloadChecksum false
				bool DisableHttpParsing false
				bool DisableIPParsing false
				bool DisableIpRawModeSecureNAT false
				bool DisableKernelModeSecureNAT false
				bool DisableUdpAcceleration false
				bool DisableUdpFilterForLocalBridgeNic false
				bool DisableUserModeSecureNAT false
				bool DoNotSaveHeavySecurityLogs false
				bool DropArpInPrivacyFilterMode true
				bool DropBroadcastsInPrivacyFilterMode true
				bool FilterBPDU false
				bool FilterIPv4 false
				bool FilterIPv6 false
				bool FilterNonIP false
				bool FilterOSPF false
				bool FilterPPPoE false
				uint FloodingSendQueueBufferQuota 33554432
				bool ManageOnlyLocalUnicastIPv6 true
				bool ManageOnlyPrivateIP true
				uint MaxLoggedPacketsPerMinute 0
				uint MaxSession 0
				bool NoArpPolling false
				bool NoDhcpPacketLogOutsideHub true
				bool NoEnum false
				bool NoIpTable false
				bool NoIPv4PacketLog false
				bool NoIPv6AddrPolling false
				bool NoIPv6DefaultRouterInRAWhenIPv6 true
				bool NoIPv6PacketLog false
				bool NoLookBPDUBridgeId false
				bool NoMacAddressLog true
				bool NoManageVlanId false
				bool NoPhysicalIPOnPacketLog false
				bool NoSpinLockForPacketDelay false
				bool RemoveDefGwOnDhcpForLocalhost true
				uint RequiredClientId 0
				uint SecureNAT_MaxDnsSessionsPerIp 0
				uint SecureNAT_MaxIcmpSessionsPerIp 0
				uint SecureNAT_MaxTcpSessionsPerIp 0
				uint SecureNAT_MaxTcpSynSentPerIp 0
				uint SecureNAT_MaxUdpSessionsPerIp 0
				bool SecureNAT_RandomizeAssignIp false
				bool SuppressClientUpdateNotification false
				bool UseHubNameAsDhcpUserClassOption false
				bool UseHubNameAsRadiusNasId false
				string VlanTypeId 0x8100
				bool YieldAfterStorePacket false
			}
			declare SecureNAT
			{
				bool Disabled false
				bool SaveLog true

				declare VirtualDhcpServer
				{
					string DhcpDnsServerAddress 192.168.30.1
					string DhcpDnsServerAddress2 0.0.0.0
					string DhcpDomainName $
					bool DhcpEnabled true
					uint DhcpExpireTimeSpan 7200
					string DhcpGatewayAddress 192.168.30.1
					string DhcpLeaseIPEnd 192.168.30.200
					string DhcpLeaseIPStart 192.168.30.10
					string DhcpPushRoutes $
					string DhcpSubnetMask 255.255.255.0
				}
				declare VirtualHost
				{
					string VirtualHostIp 192.168.30.1
					string VirtualHostIpSubnetMask 255.255.255.0
					string VirtualHostMacAddress 5E-61-83-44-52-6B
				}
				declare VirtualRouter
				{
					bool NatEnabled true
					uint NatMtu 1500
					uint NatTcpTimeout 1800
					uint NatUdpTimeout 60
				}
			}
			declare SecurityAccountDatabase
			{
				declare CertList
				{
				}
				declare CrlList
				{
				}
				declare GroupList
				{
				}
				declare IPAccessControlList
				{
				}
				declare UserList
				{
					declare vpn
					{
						byte AuthNtLmSecureHash 6nwj8u/KhQ4/tUfKElZ8Mw==
						byte AuthPassword xOxeWZdl9UU5gTn6qSkKz/Hi7Fk=
						uint AuthType 1
						uint64 CreatedTime 1622536901704
						uint64 ExpireTime 0
						uint64 LastLoginTime 1622537088479
						string Note $
						uint NumLogin 1
						string RealName $
						uint64 UpdatedTime 1622536901704

						declare Traffic
						{
							declare RecvTraffic
							{
								uint64 BroadcastBytes 4710
								uint64 BroadcastCount 68
								uint64 UnicastBytes 388969
								uint64 UnicastCount 1010
							}
							declare SendTraffic
							{
								uint64 BroadcastBytes 674
								uint64 BroadcastCount 2
								uint64 UnicastBytes 181904
								uint64 UnicastCount 1228
							}
						}
					}
				}
			}
			declare Traffic
			{
				declare RecvTraffic
				{
					uint64 BroadcastBytes 1228004
					uint64 BroadcastCount 17578
					uint64 UnicastBytes 10876265
					uint64 UnicastCount 30946
				}
				declare SendTraffic
				{
					uint64 BroadcastBytes 662668
					uint64 BroadcastCount 7746
					uint64 UnicastBytes 10876139
					uint64 UnicastCount 30959
				}
			}
		}
	}
	declare VirtualLayer3SwitchList
	{
	}
}
You do not have the required permissions to view the files attached to this post.

Post Reply