[Solved] Multi-terminal / Message Server woes?

One more stumbling block that I think could affect connectivity…

Check the Network Profile Settings for your current connection for both the Server and Client machines. They should all be set to Home/Work/Private. If they are set to Public on any of your machines, then you need to change that…

#Network Profile Settings

##Windows 10 / 8

##Windows 7

##Change Network Profile Windows 10 / 8

  • click on Network Icon at the lower-right of your screen near the Clock.
  • click Network Settings
  • click Wi-Fi or Ethernet (if you have a wired network)
  • click Manage Known Networks
  • select the Network you want to change and click Properties
  • change the setting for “Make this PC discoverable
  • On : Private
  • Off : Public

##Change Network Profile Windows 7

  • click on Network Icon at the lower-right of your screen near the Clock.
  • click Open Network and Sharing Center
  • click on the blue link below your Network
  • select Work Network
  • click Close

###Reference:


#Firewall

The easiest thing to do to check if you have a Firewall problem is to simply disable the Firewall and see if your State Updates work in SambaPOS. If it works when the Firewall is disabled, then you know positively that your Firewall is blocking communication.

Here is my latest version of the Powershell script - the last 3 lines are the important ones that will set up the Rules for the ports …

##fwrules.ps1###

function getRule {
    param(
        [string] $name
    )
    $fw = Get-NetFirewallRule -DisplayName "$name" -ErrorAction:SilentlyContinue
    if ($fw) {
        return [bool]$true
    } else {
        return [bool]$false
    }
}
function setRule {
    param(
        [string] $name,
        [string] $port,
	[string] $protocol,
	[string] $profile
    )
    Set-NetFirewallRule -DisplayName "$name" -Action "Allow" -Direction "Inbound" -Enabled "True" -LocalPort "$port" -Profile "$profile" -Protocol "$protocol" -Verbose
}

function addRule {
    param(
        [string] $group,
        [string] $name,
        [string] $port,
	[string] $protocol,
	[string] $profile
    )

    $fw = getRule("$name")
    if ($fw) {
	Write-Host -ForegroundColor:Black -BackgroundColor:Magenta "`r`n*** Rule already exists, Modifying Rule: '$name' ..."
	setRule -name:"$name" -port:"$port" -profile:"$profile" -protocol:"$protocol" -Action "Allow" -Direction "Inbound" -Enabled "True"
    } else {
	Write-Host -ForegroundColor:Black -BackgroundColor:Green "`r`n****** Adding Rule: '$name' ..."
        New-NetFirewallRule -Group "$group" -DisplayName "$name" -Action "Allow" -Direction "Inbound" -Enabled "True" -LocalPort "$port" -Profile "$profile" -Protocol "$protocol"
    }

}

addRule -profile:"Private" -protocol:"TCP" -port:1433           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS SQL Traffic"
addRule -profile:"Private" -protocol:"UDP" -port:1434           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS SQL Browser Traffic"
addRule -profile:"Private" -protocol:"TCP" -port:9000           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS Messaging Server"

And here is a BAT file to execute the Powershell script. Right-click and Run as Administrator. The 3rd line is the important one. You could also open a Command Prompt (Admin), navigate to the location of fwrules.ps1, and execute line 3.

##fwrules.bat##

D:
CD D:\Programs
powershell -executionpolicy bypass -File fwrules.ps1
pause

This is the Output when the Rules are successfully added:


This is the Output when the Rules are already existing:


And here you can see the Firewall Inbound Rules that the script created:

6 Likes