121 | | |
| 121 | Aliases can be used to simplify your configurations. Imagine you have set of devices that needs the same privileges. To set firewall rules you have add rules for each device. With aliases you can bundle them under a name. To create aliases: |
| 122 | ==== Create Aliases ==== |
| 123 | Let's bundle some hosts |
| 124 | - First go to '''menu''' and select '''Firewall''', From the drop down list select '''Aliases''' |
| 125 | - In the '''IP''' tab click on '''Add''' Button |
| 126 | - In the next page set the following |
| 127 | * Name : '''Famoussites''' |
| 128 | * Description : '''some most visited sites''' |
| 129 | * Type : '''Hosts''' |
| 130 | * IP or FQDN : google.com |
| 131 | * Click '''Add Host''' You will get another box too add more hosts |
| 132 | * Add yahoo.com and facebook.com and click '''Save''', In the next page click '''Apply Changes''' |
| 133 | |
| 134 | Now let's bundle some ports |
| 135 | - Go to '''menu''' and select '''Firewall''', From the drop down list select '''Aliases''' |
| 136 | - In the '''Ports''' tab click on '''Add''' Button |
| 137 | - In the next page set the following |
| 138 | * Name : '''Usable ports''' |
| 139 | * Description : '''some most popular ports''' |
| 140 | * Type : '''Ports''' |
| 141 | * Port : add port 22,53,25,80,443 then click '''Save''', In the next page click '''Apply Changes''' |
| 142 | |
| 143 | Now lets use these aliases |
| 144 | - Go to menu and click '''Firewall''' |
| 145 | - In the drop down list select '''Rules''' go to WAN tab |
| 146 | - Edit the rule you create in the NAT section by clicking the '''pencil''' icon |
| 147 | - Change destination port range from '''any''' to '''other''' |
| 148 | - In the Custom text box type ports (Alias name) |
| 149 | - Click '''Save''' and '''Apply Changes''' |
| 150 | - Try to Ping the VM from your PC |
| 151 | - Try to SSH to the VM from your PC |
| 152 | |
| 153 | - Go to menu and click '''Firewall''' |
| 154 | - In the drop down list select '''Rules''' go to LAN tab and click '''Add''' |
| 155 | - Set the parameter as follows |
| 156 | * Action : '''Block''' |
| 157 | * Interface : '''LAN''' |
| 158 | * Address Family : '''IPv4''' |
| 159 | * Protocol : '''ICMP''' |
| 160 | * Source : '''Single Host or Alias''' |
| 161 | * Give your vm's IP address in the text box |
| 162 | * Destination : '''Single Host or Alias''' |
| 163 | * Give alias Famoussites |
| 164 | * Description : '''Block ICMP from user host''' |
| 165 | - Click '''Save''' and '''Apply changes''' on the next page |
| 166 | - Try ping to google.com, Yahoo.com, facebook.com from your VM |
| 167 | - Try ping www.ac.lk |
| 168 | |