By binding a public IP to the executor, you can access the Standard Engine from the public network.
Step 1: Creating an Endpoint
1. Log in to the DLC console, click Standard Engine from the left-side menu to enter the Standard Engine interface, and then click the Gateway Details button to enter the details page. On the CAM details page, click the Create Private Link button:
2. In the Create Private Link page, select the target VPC and target subnet. The target VPC and subnet should be chosen from a VPC within your account that is used for communication between users, access points, and the engine.
Step 2: Creating an Executor and Enabling Public Access
If you do not have an executor, first purchase a CVM to serve as the executor.
1. Go to the Tencent Cloud CVM. In the appropriate region, click Create. 2. The executor needs to be created within the subnet of the private network that was connected in Step 1:
Assign a public IP to the executor.
Ensure that the selected security group allows traffic from the specific subnet and ports required.
Step 3: Binding a Public IP to the Executor
If you are using an existing CVM as the executor but it does not have an Elastic Public IP (EIP), you can create a EIP and bind it to the executor created in Step 2:
Step 4: Modifying the Executor's iptables
1. Log in to the executor and execute the following commands on the machine:
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
iptables -t nat -A PREROUTING -p tcp --dport 10999 -j DNAT --to $endPointIp:10999
iptables -t nat -A PREROUTING -p tcp --dport 10009 -j DNAT --to $endPointIp:10009
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -L -n -v
2. $endPointIP refers to the internal IP generated in the DLC console after establishing the private connection, as shown below:
3. After completing the configuration, you can access the Standard Engine and submit tasks through the EIP bound to the NAT gateway created in Step 2.
Note:
You only need to replace the internal IP in the access link with the EIP bound to the NAT gateway.
Was this page helpful?