Tech Tip: Configuring IP Addresses for a 4D Web/Soap Server
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: March 4, 2025
When setting up a 4D Web or SOAP server, it’s important to note that the command for configuring the "Web Client IP address to listen" accepts only a single IP address (as a text value). While collection types are supported for Web CORS settings, they cannot be used to specify multiple IP addresses for server listening.
Use the following syntax to bind the web server to one specific IP address:
WEB SET OPTION(Web Client IP address to listen; "xxx.xxx.xxx.xxx") |
This directs the server to listen only on the specified IP.
There is no built-in syntax to assign two or more IP addresses directly using the WEB SET OPTION command. If you need the server to respond on multiple specific IP addresses, consider these alternatives:
- Firewall Configuration:
Let the server listen on all interfaces (by not specifying an IP address), and use your operating system’s firewall rules to restrict access to only the desired IP addresses. - Reverse Proxy:
Use a reverse proxy (such as Apache) to route incoming requests based on hostnames or IP-based rules, effectively controlling which addresses the server should respond to.