AzerothCore: change the port of authserver - azerothcore

In AzerothCore it's possible to change the port of the worldserver by changing the value of WorldServerPort in worldserver.conf. Then the value in the realm table of the acore_auth database should be updated accordingly.
What about the authserver process? It defaults to 3724. Is it possible to change it? How to then tell the client to connect to a different port?

The client points by default to port 3724 when trying to authenticate (login). That's why this is also the default value for the authserver port.
In order to change this, you have to change the value of RealmServerPort from the authserver.conf
Then the client needs to be aware that it should point to a different port, that should be done by changing the realmlist.wtf file.
For example, let's assume that the value of RealmServerPort has been changed to 4000 and that your realmlist is currently:
set realmlist localhost
then it must be changed to:
set realmlist localhost:4000

Related

how to find mariadb port number in navicate

I have a mariadb installed on my system, and I want to connect it with spring boot using jpa, so I've forgot my port number
Can someone tell me how I can find it in navicate
If you haven't connected to the database using Navicat yet and you don't already have the port, then there's no way you can find out the port from Navicat.
If you are currently connected to the database through Navicat, simply click the connection tab and you'll be shown with this dialog Then you can see the port. Even if you're not using Navicat, most tools that I know of will always need a specific port for the database connection so if you ever save the connection info on the tools, and the port is unchanged, then you can find it there.
If you're using Windows, you can try this method:
a. Make sure the database service is running then open task manager > go to "details" tab and find process name "mysqld.exe" :
if you have multiple process, note down all of the "PID" numbers.
b. Open Command Prompt (as administrator if required) then type the following netstat -aon | findstr "PID" then press "Enter"; for example, the "PID" is 2668 so like this:
You might get result of two or more rows depending on the connection made to your database but the port will all be the same. In that example, the port is 4238, that is beside the word TCP:
Protocol
Local Address (local IP:port)
Foreign Address
State
PID
TCP
0.0.0.0:4238
0.0.0.0:0
LISTENING
2668
Another method you can try is simply checking the "my.ini/my.cnf" file. If you don't know where to locate that, in Windows, open "run" dialog and type "services.msc" then click "OK".
Find MariaDB/MySQL service name (or whatever custom service name you gave to it), right click it then select "Properties":
Once the "Properties" dialog open, highlight and drag your mouse to the right (end) at the text below the "Path to executable" area to locate where your "my.ini" file is.
You can just highlight the path where the "my.ini" file, paste in "Run" then click "OK" and the file will be opened:
You can find the port under [mysqld] and [client] section. Both should have the same port but depending on your MariaDB version, the information might not be the same as this screenshot:
Additional:
IF somehow you are connected to the database through a tool (like Navicat) and able to run query but (strangely) unable to check the connection properties, then you can execute this query to get the database port number: SHOW VARIABLES LIKE '%port%';

Is it possible to restrict ForceBindIP to only inbound/outbound traffic?

I'm using ForcebindIP to point an app at a specific network adapter, like this:
forcebindip -i 192.168.0.5 MyCSharpApp.exe
This works fine and the app isn't aware (or doesn't access) any of the other network adapters on the PC.
Is it possible to restrict ForceBindIP to outbound traffic only leaving the app to receive data from any local network adapter? Or even to specify a network adapter for outbound and another for inbound traffic?
I can't find an extra startup parameter for ForceBindIP that does this.
I'd appreciate any help with this.
If I get your problem correctly, you want to bind your application to listen for packets on all available interfaces but return packets to only through one given interface. I also assume it's a server application and you don't have neiter source code nor control over its behaviour.
Disclosure: I do not know how ForceBindIP works internally, I'm basing my understanding of it on this passage from the website:
it will then inject a DLL (BindIP.dll) which loads WS2_32.DLL into memory and intercepts the bind(), connect(), sendto(), WSAConnect() and WSASendTo() functions, redirecting them to code in the DLL which verifies which interface they will be bound to and if not the one specified, (re)binds the socket
Problems to overcome
I don't believe your desired configuration is possible with just one application level DLL injector. I'll list a few issues that ForceBindIP will have to overcome to make it work:
to listen to a socket, application has to bind() it to a unique protocol-address-port combination first. An application can bind itself to either a specific address or a wildcard (i.e. listen on all interfaces). Apparently, one can bind to wildcard and specific address simultaneously as outlined in this SO question. This however will be two different sockets from the application standpoint. Therefore your application will have to know how to handle this sort of traffic.
When accepting client connection, accept() will create a new socket and parameters on that are managed by Windows, I don't believe there's an API to intercept binding here - by this time the connection is considered established.
Now imagine, we somehow got a magic socket. We can receive packets on one interface and send to another. The client (and all routing equipment on the way) will have to be aware that two packets originating from two different source IP addresses are actually part of the same connection and be able to assemble the TCP session (or correctly merge UDP streams).
You can have multiple gefault gateways with different priorities and rules (which is a whole different topic to explore) but as far as I'm aware that's not going to solve your particular issue: majority of routing protocols assume links are symmetric and expect packets to keep within same interface. There are special cases like asymmetric routing and network interface teaming but they have to be implemented on per-interface level.
One potential solution
One way to achieve what you're after (I don't know enough about your environment to claim it will work), will be to create a virtual interface, set it into yet another IP network, bind your application to it, then use firewall (to, say, allow multicast backets into the "virtual" network) and routing from that network to required default gateway with metric set to 1. I also suspect just any Windows will not be that flexible, so you might need like a Server Edition.
I am sorry this didn't turn out to be the ready-to-fly solution, I however am hoping this gives you more context to the problem you are facing and points you into other directions to explore.
You can use Set-NetAdapterAdvancedProperty command in Powershell to set the flow control of your specified adapter
To get the names and properties of all the network adapter :-
Get-NetAdapterAdvancedProperty -Name "*"
Suppose you want the network adapter named "Ethernet 2" to be only used to receive data from internet then type :-
Set-NetAdapterAdvancedProperty -Name "Ethernet 2" -DisplayName "Flow Control" -DisplayValue "Rx Enabled"
You can find more in :
https://learn.microsoft.com/en-us/powershell/module/netadapter/set-netadapteradvancedproperty?view=win10-ps
Microsoft winsock example has a usage in their example for limiting a socket to only send or receive mode. It might help.
https://learn.microsoft.com/en-us/windows/win32/winsock/complete-client-code
Outbount and Inbount limits are not imposed while binding. But latter or when connection is established.
Line of code pertaining to this in client code is toward the end.
// shutdown the connection since no more data will be sent
iResult = shutdown(ConnectSocket, SD_SEND);

UPnP: Auto-Updating or Removing old port mappings

Does a UPnP portmapping update automatically when the local computers IP updates dynamically? If not then how will you remove the old port mapping if you now have a new IP and will not be "authorised" to do so.
Suppose I could forward right before and remove right after I need the connection to be made. My issue is; what if the computer shuts down mid connection and turns back on with a different IP? Surely something must've been made in order to circumvent this.
Found an answer
UPnP is soft-state.
In [1], section 4.1, PortMappingLeaseDuration is described as a state variable that describes that a mapping is only leased for a certain duration. (indeed soft state) also [1], section 5.10, describes that if your router is set up as DHCP it must delete any IGD state for that IP if it changes
[1] https://www.rfc-editor.org/rfc/rfc6970

How to know (or specify) the localhost port used by R shiny (when running in local)

I would like to know what port R shiny will use to display the app. I can see on some forums that the port should be 8100, but when I run the app, the chosen posrt changes every time R is restarted.
Is there any way to specify this port? Or at least to know the port that will be used, to use it in another part of the script?
There is a port= parameter you can specify to runApp. The default value is NULL which chooses a random port. Read the ?runApp help page for more information.
From the runApp documentation:
If the port is not specified, and the shiny.port option is set (with options(shiny.port = XX)), then that port will be used. Otherwise, use a random port.
So simply do this:
# will set the default shiny port to 8100
options(shiny.port = 8100)
and subsequent calls to runApp will launch the app on port 8100
If you don't want to (or can't) specify the port (maybe running shiny from inside Rmarkdown), get the port this way:
session$clientData$url_port

Biztalk Ordered Delivery direct bound to multiple ports

another ordered delivery problem.
We have an orchestration which is bound to a send port which has ordered delivery true. Another send port also picks up these messages through filtering, this port also has ordered delivery.
Now for some reason when there are multiple ports using the message and one of these is directly port binded only one of the ports is being used. I mean that not both ports give an output.
If i unenlist one of the ports it's always outputted, this works in both ways.
We used to have this with 2 ports which both used filters instead, this worked but we had to change one to a direct port, the problem occured since then. Also the choice of ports for BizTalk is pretty random, because on our server it for example chooses port A and when I recreate the same problem on my local machine it for example choses port B.
It's kind of a weird problem and we have no idea what could be the cause.
David Hall: I recreated this on my BizTalk 2010 box and never faced the problem you are mentioning! You have to set ALLOW MULTIPLE RESPONSES to True. It is under the HOSTS tab in BizTalk settings dashboard.
So, I've got 4 send ports. Each has Ordered Delivery turned ON. All send ports are on same subscription, i.e. BTS.ReceivePortName. I have an MLLP receive location for receiving the message into the Biztalk box.
Test Case: Does BizTalk maintain order ?
I sent 5 diff messages in this order 1,1,2,2,3,3,4,4,5,5. All 4 send ports sent the message out in the same order 1,1,2,2,3,3,4,4,5,5.
Result; YES it does.
Forgot to mention. Everything is running under one default host of BizTalkServerApplication.
Hi this a bug in BizTalk Messaging engine worker thread, for it doesnot execute all ordered delivery Send Ports at the same time running under the same host. At max, it runs only two ordered delivery Send port, but if you have four to five ordered delivery Send ports, then only at max two send port execute at one time. To make all the ordered delivery send port works at a time, you need to put them under different host
Did you tried to add the filter to a Port Group instead, and have all the other properties in the specific ports?

Resources