FireBrick 2700 Configuration

From AAISP Support Site

2700-small.png

This page describes editing the XML directly. The Firebrick does have a Web User Interface too. Both can be used to edit the config, as they edit the same underlying XML.

These instructions are mostly applicable to the 2500 too. The difference between the 2700 and the 2500 is that:

  • The 2700 has a USB port so supports 3G fallback, the 2500 does not have a USB port.
  • The 2700 has faster throughput - 350Mbit/s on the 2700 compared to 100Mbit/s on the 2500.


Factory Default Config

The factory default config of a FireBrick looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://firebrick.ltd.uk/xml/fb2700/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://firebrick.ltd.uk/xml/fb2700/ http://firebrick.ltd.uk/download/FB2701/xml/fb2700/1.38.001.xsd" timestamp="2016-03-01T13:13:40Z" patch="22527">
   <system contact="John Doe" log-panic="fb-support"/>
   <log name="default" comment="General logging for web viewing"/>
   <log name="fb-support" comment="Log target for sending logs to FireBrick support team">
      <email to="crashlog@firebrick.ltd.uk" delay="10" comment="Crash logs emailed to FireBrick support team"/>
   </log>
   <services>
      <ntp/>
      <telnet/>
      <http local-only="true"/>
      <dns>
         <host name="my.firebrick.co.uk my.firebrick.uk"/>
      </dns>
   </services>
   <port name="LAN1" ports="1"/>
   <port name="LAN2" ports="2"/>
   <port name="LAN3" ports="3"/>
   <port name="WAN" ports="4"/>
   <interface name="LAN1" port="LAN1" ra-client="false" comment="Default LAN interface">
      <subnet name="Default IPs" ip="2001:db8::1/64 10.0.0.1/24" ra="false" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
      <dhcp name="Auto allocated IPs" comment="Allocates IP addresses automatically"/>
   </interface>
   <interface name="LAN2" port="LAN2" ra-client="false" comment="Default LAN interface">
      <subnet name="Default IPs" ip="2001:db8::1/64 10.0.0.1/24" ra="false" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
      <dhcp name="Auto allocated IPs" comment="Allocates IP addresses automatically"/>
   </interface>
   <interface name="LAN3" port="LAN3" ra-client="false" comment="Default LAN interface">
      <subnet name="Default IPs" ip="2001:db8::1/64 10.0.0.1/24" ra="false" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
      <dhcp name="Auto allocated IPs" comment="Allocates IP addresses automatically"/>
   </interface>
   <interface name="WAN" port="WAN" ra-client="true" comment="Default WAN interface">
      <subnet name="DHCP client" comment="Delete if not required, not needed if using PPP"/>
   </interface>
   <ppp name="LAN-PPPoE" port="LAN1" username="me@firebrick" password="password" nat="true"/>
   <ppp name="WAN-PPPoE" port="WAN" username="me@firebrick" password="password" nat="true"/>
   <usb>
      <dongle name="Example-3G" comment="Default 3G config, does not usually require any more settings"/>
   </usb>
   <rule-set name="Firewall: LAN" target-interface="LAN1 LAN2 LAN3" no-match-action="reject" comment="Default firewall rule for traffic to LAN">
      <rule name="Allow Firebrick" source-interface="self" comment="Allow all from the FireBrick to LAN"/>
   </rule-set>
</config>


Quick Start Config

Here we have an example of the FireBrick using NAT:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://firebrick.ltd.uk/xml/fb2700/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://firebrick.ltd.uk/xml/fb2700/ http://firebrick.ltd.uk/download/FB2701/xml/fb2700/1.38.001.xsd" timestamp="2016-03-01T13:13:40Z" patch="22527">
   <system contact="John Doe" log-panic="fb-support"/>
   <user name="admin" password="secret" timeout="1:00:00"/>
   <log name="default" comment="General logging for web viewing"/>
   <log name="fb-support" comment="Log target for sending logs to FireBrick support team">
      <email to="crashlog@firebrick.ltd.uk" delay="10" comment="Crash logs emailed to FireBrick support team"/>
   </log>
   <services>
      <ntp ntpserver="time.aa.net.uk"/>
      <telnet/>
      <http/>
      <dns resolvers="2001:8b0::2020 2001:8b0::2021 217.169.20.20 217.169.20.21"/>
   </services>
   <port name="LAN" ports="1 2 3"/>
   <port name="WAN" ports="4"/>
   <interface name="LAN" port="LAN" ra-client="false">
      <subnet ip="2001:db8::1/64 10.0.0.1/24"/>
      <dhcp name="DHCP" ip="10.0.0.2-254" lease="1:00:00"/>
   </interface>
   <interface name="WAN" port="WAN" ra-client="true"/>
   <ppp name="AAISP" port="WAN" username="me@a.1" password="secret" graph="AAISP" log="default" nat="true"/>
   <rule-set name="Firewall: LAN" target-interface="LAN" no-match-action="reject" comment="Default firewall rule for traffic to LAN">
      <rule name="Allow Firebrick" source-interface="self" comment="Allow all from the FireBrick to LAN"/>
   </rule-set>
</config>

and here the FireBrick is NAT free:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://firebrick.ltd.uk/xml/fb2700/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://firebrick.ltd.uk/xml/fb2700/ http://firebrick.ltd.uk/download/FB2701/xml/fb2700/1.38.001.xsd" timestamp="2016-03-01T13:13:40Z" patch="22527">
   <system contact="John Doe" log-panic="fb-support"/>
   <user name="admin" password="secret" timeout="1:00:00"/>
   <log name="default" comment="General logging for web viewing"/>
   <log name="fb-support" comment="Log target for sending logs to FireBrick support team">
      <email to="crashlog@firebrick.ltd.uk" delay="10" comment="Crash logs emailed to FireBrick support team"/>
   </log>
   <services>
      <ntp ntpserver="time.aa.net.uk"/>
      <telnet/>
      <http/>
      <dns resolvers="2001:8b0::2020 2001:8b0::2021 217.169.20.20 217.169.20.21"/>
   </services>
   <port name="LAN" ports="1 2 3"/>
   <port name="WAN" ports="4"/>
   <interface name="LAN" port="LAN" ra-client="false">
      <subnet ip="2001:8b0:119c:acf2::1/64 217.169.11.113/29"/>
      <dhcp name="DHCP" ip="217.169.11.114-118" lease="1:00:00"/>
   </interface>
   <interface name="WAN" port="WAN" ra-client="true"/>
   <ppp name="AAISP" port="WAN" username="me@a.1" password="secret" graph="AAISP" log="default" nat="false"/>
   <rule-set name="Firewall: LAN" target-interface="LAN" no-match-action="reject" comment="Default firewall rule for traffic to LAN">
      <rule name="Allow Firebrick" source-interface="self" comment="Allow all from the FireBrick to LAN"/>
   </rule-set>
</config>


VoIP

Here we have an example of setting up VoIP on the FireBrick, inbound and outbound calls, inbound URI calls, and outbound URI calls to AAISP:

<voip source-ip4="217.169.11.113" source-ip6="2001:8b0:119c:acf2::1">
   <carrier name="AASIP+441234567890" allow="81.187.30.110-119 90.155.3.0/24 90.155.103.0/24 2001:8b0:0:30::5060:0/112 2001:8b0:5060::/48"
            registrar="voiceless.aa.net.uk" username="+441234567890" password="secret" extn="1000"/>
   <carrier name="URI" to="@domain.name" trust-cli="true" extn="1000"/>
   <telephone name="John" display-name="John" username="John" password="secret" extn="1000" carrier="AASIP+441234567890"/>
   <telephone name="AAISP-Sales" extn="400222" uri="sales@aa.net.uk"/>
   <telephone name="AAISP-Accounts" extn="400666" uri="accounts@aa.net.uk"/>
   <telephone name="AAISP-Support" extn="400999" uri="support@aa.net.uk"/>
</voip>

and here we use Direct Dial In, extn= is removed from <carrier> element and ddi= added to <telephone> element:

<voip source-ip4="217.169.11.113" source-ip6="2001:8b0:119c:acf2::1">
   <carrier name="AASIP+441234567890" allow="81.187.30.110-119 90.155.3.0/24 90.155.103.0/24 2001:8b0:0:30::5060:0/112 2001:8b0:5060::/48"
            registrar="voiceless.aa.net.uk" username="+441234567890" password="secret"/>
   <carrier name="URI" to="@domain.name" trust-cli="true" extn="1000"/>
   <telephone name="John" display-name="John" username="John" password="secret" extn="1000" ddi="+441234567890" carrier="AASIP+441234567890"/>
   <telephone name="AAISP-Sales" extn="400222" uri="sales@aa.net.uk"/>
   <telephone name="AAISP-Accounts" extn="400666" uri="accounts@aa.net.uk"/>
   <telephone name="AAISP-Support" extn="400999" uri="support@aa.net.uk"/>
</voip>


Remote Login

Here we allow limited IPv6 addresses access to Telnet and HTTP, this stops you locking yourself out, in the example below 2001:8b0:119c:acf2::2/64 is used but you will need to use your own IP address instead, it also allows AAISP staff to login:

<telnet allow="2001:8b0:119c:acf2::2/64 2001:8b0::/47" local-only="false"/>
<http allow="2001:8b0:119c:acf2::2/64 2001:8b0::/47" local-only="false"/>

then add a user account for AAISP, don't forgot to change password to something else:

<user name="AAISP" password="secret" timeout="1:00:00"/>


Two Lines with 3G Dongle - Bonded

Ports - LAN is on ports 1 and 2, WAN1 is on port 4, WAN2 is on port 3:

<port name="LAN" ports="1 2"/>
<port name="WAN2" ports="3"/>
<port name="WAN1" ports="4"/>

Interface - LAN interface, with DHCP for IPv4 addresses and RA for IPv6 addresses, assumes PPP session is 1500 MTU, if PPP session is 1492 MTU then change 1472 to 1464 in second ra-mtu= element:

<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0:119c:acf2::1/64 217.169.11.113/29" ra="true" ra-mtu="1412" ra-dns="2001:8b0::2020 2001:8b0::2021" profile="DSL-Down"/>
<subnet ip="2001:8b0:119c:acf2::1/64 217.169.11.113/29" ra="true" ra-mtu="1472" ra-dns="2001:8b0::2020 2001:8b0::2021" profile="DSL-Up"/>
<dhcp name="DHCP" ip="217.169.11.114-118" lease="1:00:00"/>
</interface>

Interface - WAN interfaces, RA client is enabled:

<interface name="WAN1" port="WAN1" ra-client="true"/>
<interface name="WAN2" port="WAN2" ra-client="true"/>

PPP - Connect to both lines, MTU is 1500, timeout is 5 seconds:

<ppp name="AAISP1" port="WAN1" username="me@a.1" password="secret" mtu="1500" lcp-rate="1" lcp-timeout="5" graph="AAISP1" log="default" nat="false"/>
<ppp name="AAISP2" port="WAN2" username="me@a.2" password="secret" mtu="1500" lcp-rate="1" lcp-timeout="5" graph="AAISP2" log="default" nat="false"/>

Dongle - Connect over 3G:

<usb>
<dongle name="AAISP3" username="me@a.3" password="secret" nat="false" graph="AAISP3" log="default"/>
</usb>

Static Route - Brings up IPv6 default route using IPv4 tunnel when both lines are down or unplugged:

<route ip="::/0" gateway="81.187.81.6" profile="DSL-Down" comment="IPv6 default route using IPv4 tunnel"/>

Profiles - Checks if both lines are up or down:

<profile name="DSL-Down" interval="1" timeout="5" recover="1" ppp="AAISP1 AAISP2" invert="true" comment="DSL is Down"/>
<profile name="DSL-Up" not="DSL-Down" comment="DSL is Up"/>


Two Lines with 3G Dongle - Fallover

Ports - LAN is on ports 1 and 2, WAN1 is on port 4, WAN2 is on port 3:

<port name="LAN" ports="1 2"/>
<port name="WAN2" ports="3"/>
<port name="WAN1" ports="4"/>

Interface - LAN interface, with DHCP for IPv4 addresses and RA for IPv6 addresses, assumes PPP session is 1500 MTU, if PPP session is 1492 MTU then change 1472 to 1464 in second ra-mtu= element:

<interface name="LAN" port="LAN" ra-client="false">
<subnet ip="2001:8b0:119c:acf2::1/64 217.169.11.113/29" ra="true" ra-mtu="1412" ra-dns="2001:8b0::2020 2001:8b0::2021" profile="DSL-Down"/>
<subnet ip="2001:8b0:119c:acf2::1/64 217.169.11.113/29" ra="true" ra-mtu="1472" ra-dns="2001:8b0::2020 2001:8b0::2021" profile="DSL-Up"/>
<dhcp name="DHCP" ip="217.169.11.114-118" lease="1:00:00"/>
</interface>

Interface - WAN interfaces, RA client is enabled:

<interface name="WAN1" port="WAN1" ra-client="true"/>
<interface name="WAN2" port="WAN2" ra-client="true"/>

PPP - Connect to both lines, MTU is 1500, timeout is 5 seconds, localpref= gives priority to the highest value:

<ppp name="AAISP1" port="WAN1" username="me@a.1" password="secret" mtu="1500" lcp-rate="1" lcp-timeout="5" localpref="1000" graph="AAISP1" log="default" nat="false"/>
<ppp name="AAISP2" port="WAN2" username="me@a.2" password="secret" mtu="1500" lcp-rate="1" lcp-timeout="5" localpref="100" graph="AAISP2" log="default" nat="false"/>

Dongle - Connect over 3G, localpref= gives this connection the lowest priority:

<usb>
<dongle name="AAISP3" username="me@a.3" password="secret" nat="false" localpref="10" graph="AAISP3" log="default"/>
</usb>

Static Route - Brings up IPv6 default route using IPv4 tunnel when both lines are down or unplugged:

<route ip="::/0" gateway="81.187.81.6" profile="DSL-Down" comment="IPv6 default route using IPv4 tunnel"/>

Profiles - Checks if both lines are up or down:

<profile name="DSL-Down" interval="1" timeout="5" recover="1" ppp="AAISP1 AAISP2" invert="true" comment="DSL is Down"/>
<profile name="DSL-Up" not="DSL-Down" comment="DSL is Up"/>


Firewall

Here are some pre-written firewall rules:

Steam Client

This rule set restricts both inbound and outbound traffic to the Steam Client. Useful for a Windows Gaming PC or Mac Gaming System.

These static DNS entries help keep the IP addresses matched to the ones in the firewall rule set:

<dns resolvers="2001:8b0::2020 2001:8b0::2021 217.169.20.20 217.169.20.21">
   <host name="a1507.d.akamai.net"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="a1697.g.akamai.net"
         ip="23.63.99.219 23.67.255.202"/>
   <host name="a1737.g.akamai.net"
         ip="23.63.99.208 23.63.99.240"/>
   <host name="a1843.g.akamai.net"
         ip="23.67.255.200 23.67.255.208"/>
   <host name="api.steampowered.com"
         ip="23.195.77.152 23.205.213.78 92.122.219.245 104.71.179.142 173.223.184.147"/>
   <host name="cdn.akamai.steamstatic.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="cdn.store.steampowered.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="cgpromotion.azurewebsites.net"
         ip="104.40.183.236"/>
   <host name="clientconfig.akamai.steamstatic.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="images.akamai.steamusercontent.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="media.steampowered.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="media2.steampowered.com"
         ip="205.185.216.10 205.185.216.42"/>
   <host name="media3.steampowered.com"
         ip="8.253.70.30 8.253.70.110 8.253.70.142 8.254.191.94 8.254.191.238"/>
   <host name="media4.steampowered.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="repo.steampowered.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="steamcdn-a.akamaihd.net"
         ip="23.67.255.200 23.67.255.208"/>
   <host name="steamcloud-eu.storage.googleapis.com"
         ip="216.58.213.112"/>
   <host name="steamcloudams.blob.core.windows.net"
         ip="168.61.58.14"/>
   <host name="steamclouddub.blob.core.windows.net"
         ip="191.235.193.40"/>
   <host name="steamcommunity-a.akamaihd.net"
         ip="23.63.99.219 23.67.255.202"/>
   <host name="steamcommunity.com"
         ip="23.195.77.152 23.205.213.78 92.122.219.245 104.71.179.142 173.223.184.147"/>
   <host name="steamstore-a.akamaihd.net"
         ip="23.63.99.208 23.63.99.240"/>
   <host name="store.akamai.steamstatic.com"
         ip="23.63.98.10 23.63.98.17 23.63.98.18 23.63.98.19 23.63.98.26 23.63.98.27 23.63.98.32 23.63.98.33 23.63.98.41 23.63.98.43 23.63.99.58 23.63.99.90 104.86.110.249 104.86.111.137"/>
   <host name="store.steampowered.com"
         ip="23.195.77.152 23.205.213.78 92.122.219.245 104.71.179.142 173.223.184.147"/>
</dns>

Outbound Rules - Change the MAC address in the source-mac= element to your own:

<rule-set name="Steam Client: Outbound" source-interface="LAN" target-interface="pppoe" no-match-action="continue">
  <rule name="NTP"
        target-port="123"
        protocol="17"
        action="accept"/>
  <rule name="TCP"
        target-port="27014-27050"
        protocol="6"
        action="accept"/>
  <rule name="UDP"
        target-port="3478 4379 4380 27000-27030"
        protocol="17"
        action="accept"/>
  <rule name="Akamai CDN"
        target-ip="23.63.98.0/23 23.67.255.0/24 23.195.64.0/20 23.205.212.0/22 92.122.218.0/23 104.71.176.0/20 104.86.110.0/23 173.223.176.0/20"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Google Cloud"
        target-ip="216.58.213.112"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Highwinds CDN"
        target-ip="205.185.216.10 205.185.216.42"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Level3 CDN"
        target-ip="8.253.70.30 8.253.70.110 8.253.70.142 8.254.191.94 8.254.191.238 212.73.205.178"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Microsoft Cloud"
        target-ip="104.40.183.236 168.61.57.78 168.61.58.14 191.235.193.40"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Paypal Payments"
        target-ip="66.235.148.64 66.235.148.128/31"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Telia Network"
        target-ip="62.115.11.250 80.239.194.146"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Valve Software"
        target-ip="103.10.124.0/24 146.66.155.0/24 155.133.245.0/24 155.133.248.0/24 162.254.192.0/22 162.254.196.0/23 162.254.198.0/32 205.196.6.0/24"
        target-port="80 443"
        protocol="6"
        action="accept"/>
  <rule name="Deny All"
        source-mac="408D5C57F303 D8CB8AA2464E"
        action="reject"/>
</rule-set>

Inbound Rules:

<rule-set name="Steam Client: Inbound" target-interface="LAN" no-match-action="reject">
<rule name="Allow Firebrick" source-interface="self"/>
<rule name="TCP" target-port="27014-27050" protocol="6" action="accept"/>
<rule name="UDP" target-port="3478 4379 4380 27000-27030" protocol="17" action="accept"/>
</rule-set>