Enabling NAT and Routing in DGW v2.0 June 6, 2012 Proprietary 2012 Media5 Corporation
Table of Contents Introduction... 3 Starting Services... 4 Distinguishing your WAN and LAN interfaces... 5 Configuring the DHCP Server... 5 Configuring the Network Firewall... 6 Configuring the IP Routing... 6 Configuring the NAT Service... 7 Port Forwarding... 8 Page 2 of 8
Introduction The IP Routing services have been introduced in the DGW firmware version 2.0r5.69 for all gateways with two Ethernet ports. These services allow the Mediatrix unit to basically act as a router, a DHCP server and a firewall. This means that you can now connect a PC, a switch or any other Ethernet device in the LAN port of the Mediatrix unit and have access to services available on the WAN. If you have an earlier firmware version, you need to upgrade before you can follow the steps outlined in this document. In the following example, the Mediatrix 4404 is acting as: An interface to a business PBX A router and a DHCP server for end-users on the network A SIP trunk gateway for VoIP telephony Figure 1 - Network Layout Page 3 of 8
Starting Services To enable routing: 1. Access the Services section under System. 2. Set the Startup Type drop-down menu to Auto for all services. By default, the routing is turned off and the five services related to routing are not started. These five services are: o DHCP Server o IP Routing o Network Address Translation o Network Firewall o Network Traffic Control. (Some model only) 3. Click Submit. You may also start each service individually by clicking the corresponding little arrows. Figure 2 - System / Services Section Page 4 of 8
Distinguishing your WAN and LAN interfaces Access the Network -> Interfaces tab. Figure 3 - Network / Interfaces Tab You have the possibility to assign your different interfaces to a physical link. The above screenshot shows the default Mediatrix settings. The Uplink interface operates on Ethernet port 1, and will be named WAN throughout this document. The Lan1 interface operates on Ethernet port 2 and will be named LAN. Please note the Activation status of the interfaces on the right, the Lan1 interface needs to be enabled for routing. Configuring the DHCP Server By default, the DHCP server is configured to assign IP addresses between 192.168.0.11-254. Enter your desired address range and, once the DHCP Server is enabled, click Submit. Select Subnet: This is the interface used for the DHCP server. Automatic Configuration Interface: If set to Uplink, the NTP/DNS and other parameters will be the ones from the Uplink interface. If set to Lan1, you will have the option to configure them manually. Figure 4 - Network / DHCP Section Page 5 of 8
Configuring the Network Firewall By default, the Network Firewall is configured to reject all packets. You must create rules to allow packets to reach the LAN. To allow all packets to go through the LAN, set the Default Policy to Accept, and then click Submit. Please note that the Network firewall is for traffic between the Uplink (WAN) and the LAN interface. The Local Firewall is for the traffic sent directly to the Medidatrix unit. Figure 5 - Network / Network Firewall Section Configuring the IP Routing This step essentially turns the Mediatrix unit into a pure router, forwarding specified addresses to desired interfaces. Therefore if you are looking to configure your unit for DHCP and NAT, you can skip this step. You must create a rule to send all packets coming from the LAN port towards the WAN port. To do this, enable the IPv4 Forwarding under Network, IP Routing and enter the information as the screenshot below and click Submit & Apply. Figure 6 - Network / IP Routing Section Page 6 of 8
Configuring the NAT Service You must create a rule that changes the source IP address of the packets that are sent from the LAN to the WAN in order for the peers on the WAN to return their packets to the correct destination address. First you need to look up the name of your desired LAN interface. Figure 7 - Network / Status Section Then create a rule using the name of that LAN interface including a / character as source address and the name of your WAN link as New Address. The / character tells the unit to use the entire network range of the Lan1 interface as source address. Figure 8 - Network / NAT Section Click Submit & Apply. A PC can now be connected in the LAN port of the Mediatrix unit and the PC should be able to access the web or other services available on the WAN. Page 7 of 8
Port Forwarding To forward traffic from a port on the WAN interface to equipment on the LAN, you need to add a rule in the Destination Network Address Translation Rules table in the NAT Section. For example, if you want to forward all TCP packets on port 21 to a PC with the address 192.168.0.15, you would create a rule as the example below: Figure 9 - NAT Rule Example Page 8 of 8