Protect the server with the UserGate VE firewall
- Link the firewall server and the protected server.
- Check the interfaces.
- Configure the local interface on the firewall.
- Configure the NAT rule.
- Configure filtering rules.
Link the firewall server and the protected server
The organization of connectivity to the protected infrastructure depends on whether the firewall is deployed on a cloud server or on a virtual machine in a VMware-based public or private cloud.
Cloud server
VMware-based cloud
- If you need to protect cloud server, Managed Kubernetes cluster, cloud database cluster in one project with firewall, Add the firewall server to the project's private network. For different projects of the same pool configure access to the private network in different projects.
- If you need to protect a cloud server, a Managed Kubernetes cluster, a cloud database cluster that is in a different pool, or a dedicated server, a hosted server, a VMware-based virtual machine in the cloud — use a Selectel global router (formerly L3 VPNs).
-
Optional: if you do not have a private subnet in the data center where the firewall is deployed, or if you want to use a new one, create a new private subnet. When creating a subnet:
- select the first subnet address as the gateway. When entering IP range exclude the selected gateway address;
- as Secondary DNS Specify the Selectel DNS server
188.93.16.19
.
-
From control panels open the Cloud Director panel: VMware-based cloud → Cloud Director.
-
Open the virtual data center page → section Virtual Machines.
-
Open the virtual machine page
-
Go to the section Hardware → NICs.
-
Click Edit.
-
Click ADD NETWORK TO VAPP.
-
Select Type —
Routed
. -
In the table, select a private subnet. If you need to protect virtual machines in the same data center with a firewall, you can combine them with a single private network. You can use the following for different data centers in the same organization common subnet.
-
Enter the name of the network.
-
In the field Gateway CIDR Specify the subnet gateway from the column Gateway CIDR of the selected subnet.
-
Click Add.
-
On the line NIC 1 in the column Network select a subnet.
-
On the line NIC 1 in the column IP Mode select Static — Manual.
-
On the line NIC 1 in the column IP Specify an IP address from a subnet different from the gateway address.
-
If you need to protect a virtual machine in another organization, a cloud server, a cloud database, a dedicated server, hosted hardware, a cluster of Managed Kubernetes — combine them with a firewall through a global router.
Check interfaces
UserGate network interfaces are organized into zones for which security policies are configured. By default, the Internet port is assigned to zone 1, which is used for Internet access and connections from external networks.
After adding the LAN interface, you need to verify that the Internet port is in the correct zone and reassign it if necessary.
UGOS 6
UGOS 7
-
Open the CLI.
-
Perform a programmatic reboot of the server.
-
At the time of system boot, select Support Menu.
-
Select Refresh NIC names and press OK.
-
Wait for the reboot to complete.
-
Authorize with default data:
- login —
Admin
; - the password is.
utm
.
- login —
-
Print the list of interfaces:
iface list
-
Make sure that for the Internet port in the string
zone
specified value__default__ (ID=1)
. -
If the value does not match, change the zone for the Internet port:
iface config -name <eth_name> -zone 1
Specify
<eth_name>
— Internet port name.
-
Open the CLI.
-
Select the mode UGOS NGFW (serial console).
-
Authorize with default data:
- login —
Admin
; - password — leave the field blank.
- login —
-
Go to the configuration mode:
configure
-
Upgrade the NIC:
clear network interface-mapping
-
Restart the server:
reboot
-
Enter your username and password.
-
Enter the configuration mode:
configure
-
Print the list of interfaces:
show
-
Make sure that for the Internet port on the line
zone
specified value__default__
. If the value does not match, change the zone for the port:set network interface adapter <eth_name> -zone 1
Specify
<eth_name>
— Internet port name.
Configure the local interface on the firewall
- Connect to the firewall.
- Go to the section Settings → Network → Interfaces.
- For the added port port1, click Enable.
- Click Edit.
- Open the tab General.
- In the field Zone select Trusted.
- Open the tab Network.
- In the field Mode select Static.
- Click Add.
- Enter the IP address of the interface.
- Optional: change the mask.
- Click Save.
Configure a NAT rule
- Connect to the firewall.
- Go to the section Settings → Network policies → NAT and routing.
- Click Add.
- Open the tab General.
- Enter the name of the rule.
- Optional: enter a description of the rule.
- Select the type —
NAT
. - In the field SNAT IP enter the IP address of the firewall's Internet port to which the source address will be replaced. If the firewall is deployed on a cloud server with a single public address, enter the address from the private network to which the public address is bound.
- Open the tab Source.
- In the block Source area check the box Trusted.
- Optional: add a specific IP address or subnet that may be the source of the traffic. In the block Source address click Create and add a new object → AddIf you do not add addresses, the rule will work for traffic from all private networks behind the firewall. If you do not add addresses, the rule will work for traffic from all private networks behind the firewall.
- Open the tab Assignment.
- In the block Destination area check the box Management.
- Optional: add a specific IP address or subnet to which traffic can be sent. In the block Destination address click Create and add a new object → Add, enter the addresses, and save the object. If you do not add addresses, traffic can be sent to any external networks.
- Optional: to limit the list of ports for outgoing traffic, add them on the tab Service.
- Click Save.
Customize filtering rules
- Connect to the firewall.
- Go to Settings → section Network policies → Firewall.
- Click Add.
- Open the tab General.
- Enter the name of the policy.
- Optional: enter a description of the policy.
- Select an action —
Разрешить
. - Open the tab Source.
- Check the box Trusted.
- Optional: add a specific IP address or subnet that may be the source of the traffic. In the block Source address click Create and add a new object → AddIf you do not add addresses, the rule will work for traffic from all private networks behind the firewall. If you do not add addresses, the rule will work for traffic from all private networks behind the firewall.
- Open the tab Assignment.
- In the block Destination area check the box Management.
- Optional: add a specific IP address or subnet to which traffic can be sent. In the block Destination address click Create and add a new object → Add, enter the addresses, and save the object. If you do not add addresses, traffic can be sent to any external networks.
- Optional: to limit the list of ports for outgoing traffic, add them on the tab Service.
- Click Save.