last day (15 days later) » 

16:30
0
Q: firewall vs Soap (electronic billing API)

ArcanisGK507This is a complex question since it includes configuration and programming at the same time, but neither Sophos support nor the electronic billing service (consumer API) have given me an answer. context/scenario: I have an HP dedicated server with a LAMP setup in my office which, like all the com...

Of everything you asked me to do, I have no idea how to do it. :(
Ensure you don't have any TLS/SSL issues: The physical server, as it is, can be accessed on the LAN through port 80. It is not visible from the Internet. I do not use SSL/TLS on the server, but I configured it so that it can obtain updates and consume the API, so it can access Internet resources. .
I may have misread your post reading it too quickly. Are you able to figure out how to just make a web call and start baby-stepping it through connection calls. Figure out what the minimum value will be for the URL and the values it needs to make a call. If it's working with non-SOAP call method such as web browser, PowerShell invoke-webrequest, etc. from the client then it's probably something with the code you need to adjust. I'd figure out if you can get the API to answer back in any fashion from your server, another Internet connection, etc. Wireshark traces never hurt though.
You're just making a web call to a URL essentially having the code build the URL to call with the token credential, etc. If the API answers in any fashion at a specific client host via any other connection method, then baby-step if through the SOAP and PHP with less code and build on to see where the issue starts pops up.
@VomitIT-ChunkyMessStyle I tried to do something with curl, but I couldn't find a way to reproduce the sending of data to the API with the "Send" method, I assume that I must have a connection to the API because of declaring the client, at that stage I have no problems with it WSDL file... until I try to consume it, and it is not something permanent, it is something sporadic, for example 6 out of 10 requests end with an error... the other 4 pass without problems.
Do you have technical documentation such as API reference? Is it available on the Internet and do you have a link to share?
I am clear that the problem is in the response of $wsPa->__soapCall('Enviar', [$parametros]); I am figuring out how to solve it, according to the two possible approaches, from the firewall or from the php code.
I do have documentation but it is in Spanish here and I personally consider it bad.
16:53
@ArcanisGK507 Are you the Sophos firewall or network admin? Do you have firewall DENY rules set to log so you can look over the log. I would send some request and look over the logs. Try to get the public IP address of the URLs you are calling and search those
If you can enabled some form of SOAP advanced/debug logging, I would google and figure out how to do that and look over those logs.
If you have advanced UTM/IPS enabled on Sophos, see if there is something that needs opened for SOAP or perhaps XML there.
If you are using the same PHP SOAP client 100% inside and outside the network, then it has to be somethign network related I'd think
And Yes, that document is not very good or give any good examples that I saw but if you have it working 100% off the network, and all factors are the same otherwise (e.g. PHP versions, etc.) then I'd think that means the code is fine
If you could get the client in the office onto Internet not going through Sophos at least even temporarily, that would be a good thing to test as well.
Or if you have a laptop and can run it going through the office Internet through Sophos and also off the network getting the same results with error in office and works outside office, that too would indicate network and potentially Sophos
If you are using HTTP Proxy or filter rule in Sophos, see if there is a way to give it an exception list to skate through those unimpacted. I will do some more googling too.
@ArcanisGK507 Depending on your Sophos features, could be app control, web control, UTM features, proxies, filters, etc. Bypassing FW and testing, enabling verbose logs and creating them to inspect, and process of elimination to narrow down is the only way I would go about it. It might be FW so I probably would put focus there and try to find some logs showing a URL, an internal IP of the client machine, or the external/public IP of the URL showing it blocked
something then figure out how to allow.
If you call Sophos support, ensure you understand your features, and ask them how to enable logging for DENY/blocked rules. Ask them too if there is anything common with any features blocking SOAP or XML requests via HTTP. Ask them where they'd suggest you start for troubleshooting to rule the FW out.
17:10
@VomitIT-ChunkyMessStyle No
Sophos firewall support contacted me 5 minutes ago to run some tests and it seems that the problem was resolved, I am waiting for a detailed summary of the changes I make/apply to the firewall.
If the proof that I attach in the post, they are outside the network and inside the network. That's why I was sure that the problem was with the network, but I didn't know if something else was needed in the PHP soap client or if I should go directly to the firewall.
Luckily, it seems that Sophos support found the log record that showed that it was wrong and they have solved it, once you send me the answer I plan to upload it here so that at least it is documented and someone else if they have the same problem can know what should be solved in the firewall.

last day (15 days later) »