FireBrick 2700 Configuration run-through: Difference between revisions

From AAISP Support Site
mNo edit summary
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[File:2700-small.png|link=:Category:FireBrick]]
=Also See:=

*Our main [[FireBrick]] wiki page
=Also See=
*Our main [[:Category:FireBrick|FireBrick]] wiki page


=2500 and 2700=
=2500 and 2700=
These instructions are mostly applicable to the 2500 too. The difference between the 2500 and the 2700 is that:
These instructions are mostly applicable to the 2500 too. The difference between the 2500 and the 2700 is that:
*2700 has a USB port so supports 3G fallback, 2500 does not have the USB port
*2700 has a USB port so supports 3G fallback, 2500 does not have the USB port
*2700 has faster throughput (about 100Mb/s on the 2500 compared to about 350Mb/s on the 2700)
*2700 has faster throughput (about 100Mbit/s on the 2500 compared to about 350Mbit/s on the 2700)


=XML or Web UI config editor=
=XML or Web UI config editor=
Line 13: Line 15:
Here we will build a config file for a FB2700, from scratch, it should help you to build a configuration for your line(s) and help you understand the XML syntax etc. The examples are relevant for ADSL (Be and BT) as well as FTTC/FTTP through AAISP.
Here we will build a config file for a FB2700, from scratch, it should help you to build a configuration for your line(s) and help you understand the XML syntax etc. The examples are relevant for ADSL (Be and BT) as well as FTTC/FTTP through AAISP.


These examples are based on V0.00.608 (2011-01-05), and future firmware releases may have different configuration requirements. Som people converting from a 105 may prefer to also use the 105 converter tool, and base that output on the configuration for your new 2700. more info at: http://www.firebrick.co.uk/fb105config.php
These examples are based on V0.00.608 (2011-01-05), and future firmware releases may have different configuration requirements.


We have an AAISP ADSL line with the following details:
We have an AAISP ADSL line with the following details:
Line 19: Line 21:
*Username= abc@a.1 Password=secret
*Username= abc@a.1 Password=secret
*Routed IP block = 192.0.2.0/28
*Routed IP block = 192.0.2.0/28
(Later in the page, we'll be adding an IPv6 block, and bonding with a second line)
(Later in the page, we'll be adding an [[IPv6]] block, and [[bonding]] with a second line)
(192.0.2.0/28 is used in this example as the 192.9.2 block is a special block reserved for documentation (RFC 5737). We will also use the v6 documentation prefixes 2001:DB8:: (RFC 3849))
(192.0.2.0/28 is used in this example as the 192.9.2 block is a special block reserved for documentation (RFC 5737). We will also use the v6 documentation prefixes 2001:DB8:: (RFC 3849))


Line 25: Line 27:


The default configuration (of a fully-loaded FireBrick) looks like this:
The default configuration (of a fully-loaded FireBrick) looks like this:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<?xml version="1.0" encoding="UTF-8"?>
<?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/xml/fb2700/0.00.605.xsd"
<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/xml/fb2700/0.00.605.xsd"
Line 50: Line 52:
</syntaxhighlight>
</syntaxhighlight>


Which sets up the 4 Ethernet ports as separate LANs, and an IP of 10.0.0.1 (and 2001:DB8::1)&nbsp;with the FireBrick acting DHCP server on the first port. So, connecting a computer to Port 1 should get you a 10.0.0.x IP address, and you can access http://10.0.0.1 . Port 1 is also a DHCP client, so it will try to get an IP from your DHCP server, if you have one. -Check your DHCP server logs for what IP is allocated.
Which sets up the 4 [[Ethernet]] ports as separate LANs, and an IP of 10.0.0.1 (and 2001:DB8::1)&nbsp;with the FireBrick acting DHCP server on the first port. So, connecting a computer to Port 1 should get you a 10.0.0.x IP address, and you can access http://10.0.0.1 . Port 1 is also a DHCP client, so it will try to get an IP from your DHCP server, if you have one. -Check your DHCP server logs for what IP is allocated.


Port 4 is set as an example of a PPPoE client, (ie to be plugged in to a ADSL modem/FTTC/FTTP modem etc) we'll set this up a little later.
Port 4 is set as an example of a PPPoE client, (i.e. to be plugged in to a [[ADSL modem]]/FTTC/FTTP modem etc.) we'll set this up a little later.


= Configuring Initial Basic Settings =
= Configuring Initial Basic Settings =


Set yourself a user with full debug rights, eg:
Set yourself a user with full debug rights, e.g.:

<syntaxhighlight>
<tabs>
<tab name="XML">
<syntaxhighlight lang=xml>
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
</syntaxhighlight>
</syntaxhighlight>
</tab>
<tab name="GUI">
coming soon
</tab>
</tabs>



To explain the timeout a bit:
To explain the timeout a bit:
Line 65: Line 76:
PT (Period Time)
PT (Period Time)
20M is 20 minutes.
20M is 20 minutes.
You can just enter 3600, and it will convert it to PT1H (as in a number on it's own will mean seconds).
You can just enter 3600, and it will convert it to PT1H (as in a number on its own will mean seconds).


Modify the ntp time server to use the AAISP time server:
Modify the ntp time server to use the AAISP time server:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ntp timeserver="time.aaisp.net.uk"/>
<ntp timeserver="time.aaisp.net.uk"/>
</syntaxhighlight>
</syntaxhighlight>
modify the telnet service to permit only access from your LAN:
modify the telnet service to permit only access from your LAN:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<telnet allow="192.0.2.0/28"/>
<telnet allow="192.0.2.0/28"/>
</syntaxhighlight>
</syntaxhighlight>
Set DNS servers and your domain name, under the services (here we're using the AAISP DNS servers:
Set DNS servers and your domain name, under the services (here we're using the AAISP DNS servers:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
</syntaxhighlight>
</syntaxhighlight>
Line 83: Line 94:
= LAN Subnet =
= LAN Subnet =


We want to use just Ethernet port 1 on the FireBrick for our LAN, we'll be connecting port 1 to a switch, and all our devices will be plugged in to that switch.
We want to use just [[Ethernet]] port 1 on the FireBrick for our LAN, we'll be connecting port 1 to a switch, and all our devices will be plugged in to that switch.


So, first we'll add a new subnet, this can go under the current 10.0.0.1 subnet (which we'll delete later.)&nbsp;And we'll make this a DHCP server:
So, first we'll add a new subnet, this can go under the current 10.0.0.1 subnet (which we'll delete later.)&nbsp;And we'll make this a DHCP server:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
<dhcp ip="192.0.2.2-12"/>
Line 92: Line 103:
Remove the existing DHCP settings for the 10.0.0.1 interface. The LAN1 interface now looks like this:
Remove the existing DHCP settings for the 10.0.0.1 interface. The LAN1 interface now looks like this:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<interface name="LAN1" port="LAN1">
<interface name="LAN1" port="LAN1">
<subnet comment="dhcp client"/>
<subnet comment="dhcp client"/>
Line 103: Line 114:
Our complete config now looks like this:
Our complete config now looks like this:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<?xml version="1.0" encoding="UTF-8"?>
<?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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
Line 135: Line 146:


if that works, we can now safely remove the DHCP client subnet and the&nbsp;10.0.0.1 subnet, so remove the lines:
if that works, we can now safely remove the DHCP client subnet and the&nbsp;10.0.0.1 subnet, so remove the lines:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<subnet comment="dhcp client"/>
<subnet comment="dhcp client"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
Line 145: Line 156:
More info on&nbsp;http://www.firebrick.co.uk/fb2700/pppoe.php
More info on&nbsp;http://www.firebrick.co.uk/fb2700/pppoe.php


The FireBrick 2700 supports PPPoE - so you can use it to connect via an xDSL modem, eg a:
The [[FireBrick 2700]] supports PPPoE - so you can use it to connect via an xDSL modem, e.g. a:


*A BT supplied&nbsp;FTTC/FTTP Modem
*A BT supplied&nbsp;FTTC/FTTP Modem
*A standard issue AAISP ZyXEL P660-D1, in bridge mode (Go to: Wan - Wan setup, mode Bridge, Encapsulation RFC1483, Multiplex LLC)
*A standard issue AAISP ZyXEL P660-D1, in bridge mode (Go to: Wan - Wan setup, mode Bridge, Encapsulation RFC1483, Multiplex LLC)
*Another ADSL router set for bridge mode
*Another [[ADSL Router|ADSL router]] set for bridge mode
*A modem such as a Draytek [[Vigor_120]] (firmware 3.2.4.3 and above)
*A modem such as a Draytek [[Vigor 120]] (firmware 3.2.4.3 and above)


Note: You cannot just use any of these devices on any line type: There are combinations that will work, and combinations that will not. You MUST read the link above. In short, BT lines can auto-detect PPPoA or PPPoE, so will work with pretty much anything. BE lines on the other hand are hard-coded to either PPPoE OR PPPoA. For a BE PPPoE line, a simple bridge mode router like the ZyXEL is the correct choice. For a BE PPPoA line, you need a device that can do true PPPoA on the wire <-> PPPoE on the LAN to the FB. The Vigour 120 is one of the only devices that can do this.
Note: You cannot just use any of these devices on any line type: There are combinations that will work, and combinations that will not. You MUST read the link above. In short, BT lines can auto-detect PPPoA or PPPoE, so will work with pretty much anything. BE lines on the other hand are hard-coded to either PPPoE OR PPPoA. For a BE PPPoE line, a simple bridge mode router like the ZyXEL is the correct choice. For a BE PPPoA line, you need a device that can do true PPPoA on the wire <-> PPPoE on the LAN to the FB. The Vigour 120 is one of the only devices that can do this.


In our default config, you can see that we already have some PPPoE settings:
In our default config, you can see that we already have some PPPoE settings:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ppp port="LAN4" username="startup_user@startup_domain" password="" comment="Example PPPoE config for DSL/FTTC/FTTP/etc"/>
<ppp port="LAN4" username="startup_user@startup_domain" password="" comment="Example PPPoE config for DSL/FTTC/FTTP/etc"/>
</syntaxhighlight>
</syntaxhighlight>
This is using Ethernet port 4, so plug your modem in to that port.
This is using [[Ethernet]] port 4, so plug your modem in to that port.


This line can be changed for your ADSL settings, eg:
This line can be changed for your ADSL settings, e.g.:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true"/>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true"/>
</syntaxhighlight>
</syntaxhighlight>
Line 167: Line 178:


We've changed the port to WAN1, so we also need to change the port config earlier in the file, so change
We've changed the port to WAN1, so we also need to change the port config earlier in the file, so change
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="LAN4" ports="4"/>
<port name="LAN4" ports="4"/>
</syntaxhighlight>
</syntaxhighlight>
to:
to:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="WAN1" ports="4"/>
<port name="WAN1" ports="4"/>
</syntaxhighlight>
</syntaxhighlight>

Our complete config in full now looks like this:
Our complete config in full now looks like this:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<?xml version="1.0" encoding="UTF-8"?>
<?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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
Line 202: Line 214:


==1500 MTU?==
==1500 MTU?==
The Default MTU is 1492 for PPPoE. However if your modem supports jumboframes, then you should be able to use a full 1500MTU on the PPPoE. The BT supplied modem for FTTC does support this, other modems may or may not...
The Default MTU is 1492 for PPPoE. However, if your modem supports jumboframes, then you should be able to use a full 1500MTU on the PPPoE. The BT supplied modem for FTTC does support this, other modems may or may not...
Config wise, just add mtu="1500" to the ppp element.
Config wise, just add mtu="1500" to the ppp element.
e.g.:
eg:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" mtu="1500"/>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" mtu="1500"/>
</syntaxhighlight>
</syntaxhighlight>


==ZyXEL P660R-D1 Notes==
==ZyXEL P660R-D1 Notes==
(These notes will be similar for any type of ADSL router in Bridge mode, or ADSL modems.)
(These notes will be similar for any type of [[ADSL Router|ADSL router]] in Bridge mode, or ADSL modems.)


The P660R-D1 also supports a hybrid [http://www.zyxel.co.uk/web/support_faq_detail.php?faqID=136&pid=20040812093058 Half Bridge mode]; the PPP session is terminated on the modem but its internal NAT is disabled and the WAN IP is assigned to the firewall / router connected to its ethernet port via short DHCP lease. This configuration may suffice for some simpler setups, the advantage being the modem can be used with a PPPoA setup (e.g. Opal / Tiscali Business LLU). The modem remains accessible on its default LAN IP address.
The P660R-D1 also supports a hybrid [http://www.zyxel.co.uk/web/support_faq_detail.php?faqID=136&pid=20040812093058 Half Bridge mode]; the PPP session is terminated on the modem but its internal NAT is disabled and the WAN IP is assigned to the firewall / router connected to its [[ethernet]] port via short DHCP lease. This configuration may suffice for some simpler setups, the advantage being the modem can be used with a PPPoA setup (e.g. Opal / Tiscali Business LLU). The modem remains accessible on its default LAN IP address.


When setting up the ZyXEL to work with the FireBrick, set the WAN settings to be:
When setting up the ZyXEL to work with the FireBrick, set the WAN settings to be:


===For a BT Line ( which will do PPPoA or PPPoE ):===
===For a BT or TT Line ( which will do PPPoA or PPPoE )===
*Name: AAISP (But can be anything)
*Name: AAISP (But can be anything)
*Mode: Bridge
*Mode: Bridge
*Encapsulation: RFC 1483
*Encapsulation: RFC 1483
*Multiplexing: LLC (VC may work on 20cn, but stick with LLC)
*Multiplexing: LLC (VC may work on BT 20cn, but stick with LLC)
*VPI: 0
*VPI: 0
*VCI: 38
*VCI: 38
*ADSL modulation type: Multimode
*ADSL modulation type: Multimode

===For a Be PPPoE Line:===
*Name: AAISP (But can be anything)
*Mode: Bridge
*Encapsulation: RFC 1483
*Multiplexing: LLC
*VPI: 0
*VCI: 101
*ADSL modulation type: Multimode

===For a Be PPPoA Line:===
Most A&A BE lines from around December 2010 are PPPoA - they use the same VPI/VCI as BT (0/38).

You will need to use a Draytek Vigour 120, or similar device, which can provide true PPPoA <-> PPPoE bridging. The ZyXEL P660R-D1 won't do this. Please read the link: &nbsp;http://www.firebrick.co.uk/fb2700/pppoe.php

Also make a note of the LAN address, as you'll set a subnet on the FireBrick below so that you can still access the ZyXEL from your LAN.
As the ZyXEL is not doing any PPP in bridge mode, the 'Internet' LED will not light up, the DSL light will still indicate sync though.

Because of a quirk in the way these lines are configured by Be, PPPoEoA (bridge mode on the ZyXEL) does in fact work. However, it is an unsupported configuration. It will almost certainly work for the lifetime of the service, but if it does ever break Be will not fix it.


===Bridge Mode on Billion 7800N===
===Bridge Mode on Billion 7800N===
Line 256: Line 249:
Since that page is more of a referece than a tutorial, it contains no examples. So here's a code snippet from a working config which allows incoming SMTP to your mail server, and IAX2 to an asterisk box as a starting-point:
Since that page is more of a referece than a tutorial, it contains no examples. So here's a code snippet from a working config which allows incoming SMTP to your mail server, and IAX2 to an asterisk box as a starting-point:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<rule-set target-interface="LAN1" drop="reject" comment="Default firewall rule - block incoming">
<rule-set target-interface="LAN1" drop="reject" comment="Default firewall rule - block incoming">
<rule source-interface="self" comment="Allow from the FireBrick though"/>
<rule source-interface="self" comment="Allow from the FireBrick though"/>
Line 264: Line 257:
</syntaxhighlight>
</syntaxhighlight>


For debugging, you can add log="true" and/or graph="xyz" to the <rule .../> lines, which will then print an entry to the log when the rule is matched, and will also draw graphs for that traffic, eg:
For debugging, you can add log="true" and/or graph="xyz" to the <rule .../> lines, which will then print an entry to the log when the rule is matched, and will also draw graphs for that traffic, e.g.:


== VoIP Rules ==
== VoIP Rules ==


If you have VoIP phones on your LAN, then here are some example rules to allow SIP and RTP from the AAISP phone servers:
If you have VoIP phones on your LAN, then here are some example rules to allow SIP and RTP from the AAISP phone servers:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<rule-set name="Incoming Firewall Rules">
<rule-set name="Incoming Firewall Rules">
<rule name="SIP" source-ip="81.187.30.110-119" target-ip="192.0.2.0/28" target-port="5060-5069"/>
<rule name="SIP" source-ip="81.187.30.110-119" target-ip="192.0.2.0/28" target-port="5060-5069"/>
Line 281: Line 274:
== Restricting FireBrick Config access ==
== Restricting FireBrick Config access ==


You may only want to allow access to the FireBrick webserver from your LAN, do this in the http service, eg, change the current line to:
You may only want to allow access to the FireBrick webserver from your LAN, do this in the http service, e.g., change the current line to:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<http allow="192.0.2.1/28"/>
<http allow="192.0.2.1/28"/>
</syntaxhighlight>
</syntaxhighlight>
Line 288: Line 281:
= Native IPv6 =
= Native IPv6 =


Assuming you have an IPv6 block allocated to your line on Clueless and you're using the FB for PPPoE, then all the FB config needs is:
Assuming you have an [[IPv6]] block allocated to your line on Clueless and you're using the FB for PPPoE, then all the FB config needs is:


*An IPv6 address on the LAN subnet
*An [[IPv6]] address on the LAN subnet
*ra="true" in the subnet
*ra="true" in the subnet


Your computers should then get IPv6 details. test on http://ip.help.me.uk.
Your computers should then get [[IPv6]] details. test on http://ip.help.me.uk.


If you previously had your IPv6 allocation routed over a Protocol 41 tunnel to a tunnel end-point machine on your LAN, you now need to remove that on clueless to allow native IPv6 to the FB. Log in to clueless and simply clear the IPv4 endpoint address, and save the changes. You then need to drop the connection to AAISP, and re-connect, for the routing change to take effect. Also remember to shut down your LAN tunnel endpoint, so it's not still announcing routes it can't honour any more.
If you previously had your [[IPv6]] allocation routed over a Protocol 41 tunnel to a tunnel end-point machine on your LAN, you now need to remove that on clueless to allow native [[IPv6]] to the FB. Log in to clueless and simply clear the IPv4 endpoint address, and save the changes. You then need to drop the connection to AAISP, and re-connect, for the routing change to take effect. Also remember to shut down your LAN tunnel endpoint, so it's not still announcing routes it can't honour any more.


If you still need to use Tunnelled IPv6, rather than Native, see this page: *[[FireBrick 2700 v6 Tunnel]]
If you still need to use Tunnelled [[IPv6]], rather than Native, see this page: *[[FireBrick 2700 v6 Tunnel]]


So, our config will look like this:
So, our config will look like this:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<interface name="LAN1" port="LAN1">
<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="IPv6 LAN"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="[[IPv6]] LAN"/>
...
...
</interface>
</interface>
Line 310: Line 303:
Our complete config now looks like:
Our complete config now looks like:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<?xml version="1.0" encoding="UTF-8"?>
<?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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
Line 319: Line 312:
<port name="WAN1" ports="4"/>
<port name="WAN1" ports="4"/>
<interface name="LAN1" port="LAN1">
<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="IPv6 LAN"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="[[IPv6]] LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
<dhcp ip="192.0.2.2-12"/>
Line 340: Line 333:
( since release V0.02.039 )
( since release V0.02.039 )


Setting 'ra=true' will enable auto-configuration of IPv6 addresses, and of the Default Route.
Setting 'ra=true' will enable auto-configuration of [[IPv6]] addresses, and of the Default Route.
You may also wish to configure IPv6 DNS servers ( DNS servers that are to be queried over IPv6 ).
You may also wish to configure [[IPv6]] DNS servers ( DNS servers that are to be queried over [[IPv6]] ).


There are a couple of different mechanisms available to push out IPv6 DNS servers, and the FB2700 supports both.
There are a couple of different mechanisms available to push out [[IPv6]] DNS servers, and the FB2700 supports both.
Be sure your DNS server actually responds on it's IPv6 address!
Be sure your DNS server actually responds on its [[IPv6]] address!


The first method is to have the FB include the DNS server addresses as a new option( RDNSS ) in the Router Announcements. ( RFC6106 ).
The first method is to have the FB include the DNS server addresses as a new option( RDNSS ) in the Router Announcements. ( RFC6106 ).
RFC6106 aware clients are, however, somewhat thin on the ground at the moment.
RFC6106 aware clients are, however, somewhat thin on the ground at the moment.
To enable this, set the 'ra-dns' option to point to your IPv6 Recursive DNS Server.
To enable this, set the 'ra-dns' option to point to your [[IPv6]] Recursive DNS Server.
In this example, I'm pointing it to a DNS server on 2001:8B0:B7:1::2.
In this example, I'm pointing it to a DNS server on 2001:8B0:B7:1::2.


<syntaxhighlight>
<syntaxhighlight lang=xml>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-dns="2001:8B0:123:1::2"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-dns="2001:8B0:123:1::2"/>
</syntaxhighlight>
</syntaxhighlight>
Line 358: Line 351:
If the client is smart enough, this is all it will take.
If the client is smart enough, this is all it will take.


Most clients are not currently able to recieve this option.
Most clients are not currently able to receive this option.
So we can also use the more traditional method:
So we can also use the more traditional method:
Setting the 'O' flag in the RA, telling the client to do DHCPv6 after auto-configuration, and request 'Other' config data, ie DNS.
Setting the 'O' flag in the RA, telling the client to do DHCPv6 after auto-configuration, and request 'Other' config data, i.e. DNS.


<syntaxhighlight>
<syntaxhighlight lang=xml>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="true"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="true"/>
</syntaxhighlight>
</syntaxhighlight>
Line 372: Line 365:
To enable the 'O' flag AND the mini-DHCPv6, set the ra-other option to 'dhcpv6', and also specify the DNS server address to be doled out in the rd-dns option:
To enable the 'O' flag AND the mini-DHCPv6, set the ra-other option to 'dhcpv6', and also specify the DNS server address to be doled out in the rd-dns option:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2"/>
</syntaxhighlight>
</syntaxhighlight>
Line 383: Line 376:
Note:
Note:
It's not always clear on the win boxes whether this worked.
It's not always clear on the win boxes whether this worked.
On a Vista box, the command 'ipconfig /all' will show both IPv4 and IPv6 DNS servers configured.
On a Vista box, the command 'ipconfig /all' will show both IPv4 and [[IPv6]] DNS servers configured.
Win7 seems lame, and only reports IPv4.
Win7 seems lame, and only reports IPv4.
To show the IPv6 DNS servers, you need to use the command 'netsh interface ipv6 show dns'.
To show the [[IPv6]] DNS servers, you need to use the command 'netsh interface [[IPv6|ipv6]] show dns'.


= Next Steps, Bonding a Second Line =
= Next Steps, Bonding a Second Line =
Line 394: Line 387:
== Set up second PPPoE ==
== Set up second PPPoE ==


Set up port 3 to connect to the second modem you have, ie:
Set up port 3 to connect to the second modem you have, i.e.:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true"/>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true"/>
</syntaxhighlight>
</syntaxhighlight>
and change the port from:
and change the port from:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="LAN3" ports="3"/>
<port name="LAN3" ports="3"/>
</syntaxhighlight>
</syntaxhighlight>
to
to
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="WAN2" ports="3"/>
<port name="WAN2" ports="3"/>
</syntaxhighlight>
</syntaxhighlight>
Line 415: Line 408:
*Port 4 = ADSL Line 1
*Port 4 = ADSL Line 1


== Bond the PPPoE: ==
== Bond the PPPoE ==


''Bonding on a 2700 requires the Bonding capability - found on the Fully-Loaded and Bonding variants.''
''[[Bonding]] on a 2700 requires the [[Bonding]] capability - found on the Fully-Loaded and [[Bonding]] variants.''


Simply setting speed=x in the ppp config will bond the PPPoE for uplink.
Simply setting speed=x in the ppp config will bond the PPPoE for uplink.
The speed value is in ''bits per sec''. You can use G/M/K when specifying the value, as well as B for bytes, or i, power of 2. eg, 1000000 is the same as 1M)
The speed value is in ''bits per sec''. You can use G/M/K when specifying the value, as well as B for bytes, or i, power of 2. e.g., 1000000 is the same as 1M)


eg:
e.g.:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" speed="1000000"/>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" speed="1000000"/>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true" speed="1000000"/>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true" speed="1000000"/>
</syntaxhighlight>
</syntaxhighlight>
Since each PPP connection will give the FireBrick a default route, the FireBrick will use both, and upload traffic on each ppp connection up to the speed given. The speed is in bits, so this example is where the upload is 1M.
Since each PPP connection will give the FireBrick a default route, the FireBrick will use both, and upload traffic on each ppp connection up to the speed given. The speed is in bits, so this example is where the upload is 1M.
If the upload is different on the lines, then that's fine - eg, you may have a line using Annex-A and one Annex-M. Setting the speed correctly will mean the correct amount of traffic will be sent up each line.
If the upload is different on the lines, then that's fine - e.g., you may have a line using Annex-A and one Annex-M. Setting the speed correctly will mean the correct amount of traffic will be sent up each line.


Our config now looks like this:
Our config now looks like this:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<?xml version="1.0" encoding="UTF-8"?>
<?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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
Line 441: Line 434:
<port name="WAN1" ports="4"/>
<port name="WAN1" ports="4"/>
<interface name="LAN1" port="LAN1">
<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2" comment="IPv6 LAN"/>
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2" comment="[[IPv6]] LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
<dhcp ip="192.0.2.2-12"/>
Line 461: Line 454:


= Setting up 3G Fallback =
= Setting up 3G Fallback =
If you have an AA data SIM, the FireBrick can configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IP blocks will continue to work across this link, but so far IPv6 isn't supported. The FireBrick is known to support the ZTE MF112 Dongle and some Huawei dongles. Others may work too.
If you have an AA data SIM, the FireBrick can configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IP blocks will continue to work across this link, but so far [[IPv6]] isn't supported. The FireBrick is known to support the ZTE MF112 Dongle and some Huawei dongles. Others may work too.
The basic config is:
The basic config is:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<usb>
<usb>
<dongle username="startup_user@startup_domain" password=""/>
<dongle username="startup_user@startup_domain" password=""/>
Line 476: Line 469:
To make use of port 2, we can configure it to be another LAN1 port.
To make use of port 2, we can configure it to be another LAN1 port.
Our current port config is:
Our current port config is:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="LAN1" ports="1"/>
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="LAN2" ports="2"/>
Line 483: Line 476:
</syntaxhighlight>
</syntaxhighlight>
We can change this to make port 2 a LAN1 port:
We can change this to make port 2 a LAN1 port:
<syntaxhighlight>
<syntaxhighlight lang=xml>
<port name="LAN1" ports="1 2"/>
<port name="LAN1" ports="1 2"/>
<port name="WAN2" ports="3"/>
<port name="WAN2" ports="3"/>
Line 494: Line 487:
== Accessing the Modem ==
== Accessing the Modem ==


The modem, or ADSL router in bridge mode, will also have a LAN IP that you can use to get to it's config pages etc. eg, the ZyXEL P660-R will still have a LAN setting, with an IP set. For the purpose of this example, let's assume the modem is on 192.168.1.2 mask 255.255.255.0.
The modem, or [[ADSL Router|ADSL router]] in bridge mode, will also have a LAN IP that you can use to get to its config pages etc. e.g., the ZyXEL P660-R will still have a LAN setting, with an IP set. For the purpose of this example, let's assume the modem is on 192.168.1.2 mask 255.255.255.0.


In order to talk to the Modem from the LAN side of the FireBrick, a Subnet on the FireBrick needs to be made. This subnet would be on the WAN Interface, eg:
In order to talk to the Modem from the LAN side of the FireBrick, a Subnet on the FireBrick needs to be made. This subnet would be on the WAN Interface, e.g.:


<syntaxhighlight>
<syntaxhighlight lang=xml>
<interface name="WAN" port="WAN1">
<interface name="WAN" port="WAN1">
<subnet ip="192.168.1.1/24" comment="IP subnet on WAN for router config"/>
<subnet ip="192.168.1.1/24" comment="IP subnet on WAN for router config"/>
Line 504: Line 497:
</syntaxhighlight>
</syntaxhighlight>


== Static Routes: ==
== Static Routes ==


The previous config will put the FB on 192.168.1.1, and allow the FB to route IP packets between your LAN subnet and the 192.168.1 subnet. However, at this stage, you may find you are still unable to ping the modem on the WAN port. This is because although packets from your 81.x.x.x address are correctly routed to the modem, the modem itself knows no route back to 81.x.x.x. It know nothing of the FB. So we need to tell it by setting a static route.
The previous config will put the FB on 192.168.1.1, and allow the FB to route IP packets between your LAN subnet and the 192.168.1 subnet. However, at this stage, you may find you are still unable to ping the modem on the WAN port. This is because although packets from your 81.x.x.x address are correctly routed to the modem, the modem itself knows no route back to 81.x.x.x. It know nothing of the FB. So we need to tell it by setting a static route.


ZyXel P-660R:
=== ZyXel P-660R ===


You will have configured the IP and Netmask on the 'LAN' tab. But there's no 'Gateway', so we must go to 'Advanced' -&gt; 'Static Routes' tab, and create one. Enter it as follows: IP, Mask = base address of your internal LAN; eg: 81.xx.xx.0, 255.255.255.192. The 'Gateway' address is pointing back at the FB, eg 192.168.1.1. Check the box to Activate the route, hit the 'Apply' button, and that's it done.
You will have configured the IP and Netmask on the 'LAN' tab. But there's no 'Gateway', so we must go to 'Advanced' -&gt; 'Static Routes' tab, and create one. Enter it as follows: IP, Mask = base address of your internal LAN; e.g.: 81.xx.xx.0, 255.255.255.192. The 'Gateway' address is pointing back at the FB, e.g. 192.168.1.1. Check the box to Activate the route, hit the 'Apply' button, and that's it done.


Vigor 120:
=== [[Vigor 120]] ===


You need to telnet in to the CLI to set the route. The commands to set a route back to 81.x.x.0 via the FB at 192.168.1.1 are:
You need to telnet in to the CLI to set the route. The commands to set a route back to 81.x.x.0 via the FB at 192.168.1.1 are:
Line 533: Line 526:
== Other, other things ==
== Other, other things ==


You may want to look at the [[FireBrick]] page as there are examples there fro setting up OTP, syslog, auto-updates and so on.
You may want to look at the [[:Category:FireBrick]] page as there are examples there from setting up OTP, syslog, auto-updates and so on.


[[Category:FireBrick|Configuration]]
[[Category:Bonding]][[Category:FireBrick]][[Category:BT]][[Category:BE]][[Category:ADSL]][[Category:Configuring]]

Revision as of 09:44, 30 Mayıs 2020

2700-small.png

Also See

2500 and 2700

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

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

XML or Web UI config editor

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.

Overview

Here we will build a config file for a FB2700, from scratch, it should help you to build a configuration for your line(s) and help you understand the XML syntax etc. The examples are relevant for ADSL (Be and BT) as well as FTTC/FTTP through AAISP.

These examples are based on V0.00.608 (2011-01-05), and future firmware releases may have different configuration requirements.

We have an AAISP ADSL line with the following details:

  • Username= abc@a.1 Password=secret
  • Routed IP block = 192.0.2.0/28

(Later in the page, we'll be adding an IPv6 block, and bonding with a second line) (192.0.2.0/28 is used in this example as the 192.9.2 block is a special block reserved for documentation (RFC 5737). We will also use the v6 documentation prefixes 2001:DB8:: (RFC 3849))

Default Config

The default configuration (of a fully-loaded 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/xml/fb2700/0.00.605.xsd"
timestamp="1970-01-01T00:00:07Z">
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="LAN3" ports="3"/>
<port name="LAN4" ports="4"/>
<interface name="LAN1" port="LAN1">
<subnet comment="dhcp client"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
<dhcp ip="10.0.0.100-199"/>
</interface>
<ppp port="LAN4" username="startup_user@startup_domain" password="" comment="Example PPPoE config for DSL/FTTC/FTTP/etc"/>
<services>
<ntp/>
<telnet comment="Set allow IP list to restrict access"/>
<http/>
</services>
<rule-set target-interface="LAN1" drop="reject" comment="default firewall rule - block incoming">
<rule source-interface="self" comment="allow from the FireBrick though"/>
</rule-set>
</config>

Which sets up the 4 Ethernet ports as separate LANs, and an IP of 10.0.0.1 (and 2001:DB8::1) with the FireBrick acting DHCP server on the first port. So, connecting a computer to Port 1 should get you a 10.0.0.x IP address, and you can access http://10.0.0.1 . Port 1 is also a DHCP client, so it will try to get an IP from your DHCP server, if you have one. -Check your DHCP server logs for what IP is allocated.

Port 4 is set as an example of a PPPoE client, (i.e. to be plugged in to a ADSL modem/FTTC/FTTP modem etc.) we'll set this up a little later.

Configuring Initial Basic Settings

Set yourself a user with full debug rights, e.g.:

<tabs> <tab name="XML">

<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>

</tab> <tab name="GUI"> coming soon </tab> </tabs>


To explain the timeout a bit: The timeout is how long this user stays logged in to the FB admin pages/telnet. PT (Period Time) 20M is 20 minutes. You can just enter 3600, and it will convert it to PT1H (as in a number on its own will mean seconds).

Modify the ntp time server to use the AAISP time server:

<ntp timeserver="time.aaisp.net.uk"/>

modify the telnet service to permit only access from your LAN:

<telnet allow="192.0.2.0/28"/>

Set DNS servers and your domain name, under the services (here we're using the AAISP DNS servers:

<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>

Note: If you are using PPPoE, then you can leave the resolves empty, and the FireBrick will obtain the DNS servers from the ISP.

LAN Subnet

We want to use just Ethernet port 1 on the FireBrick for our LAN, we'll be connecting port 1 to a switch, and all our devices will be plugged in to that switch.

So, first we'll add a new subnet, this can go under the current 10.0.0.1 subnet (which we'll delete later.) And we'll make this a DHCP server:

<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>

Remove the existing DHCP settings for the 10.0.0.1 interface. The LAN1 interface now looks like this:

<interface name="LAN1" port="LAN1">
<subnet comment="dhcp client"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
</interface>

Our complete config now 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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="LAN3" ports="3"/>
<port name="LAN4" ports="4"/>
<interface name="LAN1" port="LAN1">
<subnet comment="dhcp client"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
</interface>
<ppp port="LAN4" username="startup_user@startup_domain" password="" comment="Example PPPoE config for DSL/FTTC/FTTP/etc"/>
<services>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
<ntp timeserver="90.155.53.32 2001:8B0:0:53::5A9B:3520"/>
<telnet allow="192.0.2.0/28"/>
<http/>
</services>
<rule-set target-interface="LAN1" drop="reject" comment="default firewall rule - block incoming">
<rule source-interface="self" comment="allow from the FireBrick though"/>
</rule-set>
</config>

At this point we can save the config, there should be no errors.

Our computer should then pick up a new 192.0.2.x IP address, and we can connected back to the FireBrick on http://192.0.2.1

if that works, we can now safely remove the DHCP client subnet and the 10.0.0.1 subnet, so remove the lines:

<subnet comment="dhcp client"/>
<subnet ip="2001:DB8::1/64 10.0.0.1/24" nat="true" comment="Temporary IPs for setup only, delete when finished configuring"/>

Save, and re-connect to the web interface.

PPPoE

More info on http://www.firebrick.co.uk/fb2700/pppoe.php

The FireBrick 2700 supports PPPoE - so you can use it to connect via an xDSL modem, e.g. a:

  • A BT supplied FTTC/FTTP Modem
  • A standard issue AAISP ZyXEL P660-D1, in bridge mode (Go to: Wan - Wan setup, mode Bridge, Encapsulation RFC1483, Multiplex LLC)
  • Another ADSL router set for bridge mode
  • A modem such as a Draytek Vigor 120 (firmware 3.2.4.3 and above)

Note: You cannot just use any of these devices on any line type: There are combinations that will work, and combinations that will not. You MUST read the link above. In short, BT lines can auto-detect PPPoA or PPPoE, so will work with pretty much anything. BE lines on the other hand are hard-coded to either PPPoE OR PPPoA. For a BE PPPoE line, a simple bridge mode router like the ZyXEL is the correct choice. For a BE PPPoA line, you need a device that can do true PPPoA on the wire <-> PPPoE on the LAN to the FB. The Vigour 120 is one of the only devices that can do this.

In our default config, you can see that we already have some PPPoE settings:

<ppp port="LAN4" username="startup_user@startup_domain" password="" comment="Example PPPoE config for DSL/FTTC/FTTP/etc"/>

This is using Ethernet port 4, so plug your modem in to that port.

This line can be changed for your ADSL settings, e.g.:

<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true"/>

We've also set the FireBrick to create a graph for this, as well as to log.

We've changed the port to WAN1, so we also need to change the port config earlier in the file, so change

<port name="LAN4" ports="4"/>

to:

<port name="WAN1" ports="4"/>

Our complete config in full now 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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="LAN3" ports="3"/>
<port name="WAN1" ports="4"/>
<interface name="LAN1" port="LAN1">
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
</interface>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true"/>
<services>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
<ntp timeserver="90.155.53.32 2001:8B0:0:53::5A9B:3520"/>
<telnet allow="192.0.2.0/28"/>
<http/>
</services>
<rule-set target-interface="LAN1" drop="reject" comment="default firewall rule - block incoming">
<rule source-interface="self" comment="allow from the FireBrick though"/>
</rule-set>
</config>

By default the PPPoE will be used as the default route, saving this config should mean you have an internet connection!

1500 MTU?

The Default MTU is 1492 for PPPoE. However, if your modem supports jumboframes, then you should be able to use a full 1500MTU on the PPPoE. The BT supplied modem for FTTC does support this, other modems may or may not... Config wise, just add mtu="1500" to the ppp element. e.g.:

<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" mtu="1500"/>

ZyXEL P660R-D1 Notes

(These notes will be similar for any type of ADSL router in Bridge mode, or ADSL modems.)

The P660R-D1 also supports a hybrid Half Bridge mode; the PPP session is terminated on the modem but its internal NAT is disabled and the WAN IP is assigned to the firewall / router connected to its ethernet port via short DHCP lease. This configuration may suffice for some simpler setups, the advantage being the modem can be used with a PPPoA setup (e.g. Opal / Tiscali Business LLU). The modem remains accessible on its default LAN IP address.

When setting up the ZyXEL to work with the FireBrick, set the WAN settings to be:

For a BT or TT Line ( which will do PPPoA or PPPoE )

  • Name: AAISP (But can be anything)
  • Mode: Bridge
  • Encapsulation: RFC 1483
  • Multiplexing: LLC (VC may work on BT 20cn, but stick with LLC)
  • VPI: 0
  • VCI: 38
  • ADSL modulation type: Multimode

Bridge Mode on Billion 7800N

  • Protocol = Pure Bridge
  • Encap = LLC/SNAP-BRIDGING

(Don't forget to plug the FB in to the LAN ports and not the eWAN port.

Filters

With no filters set, the default is to allow all incoming and outgoing traffic.

More info on http://www.firebrick.co.uk/fb2700/firewall.php

Since that page is more of a referece than a tutorial, it contains no examples. So here's a code snippet from a working config which allows incoming SMTP to your mail server, and IAX2 to an asterisk box as a starting-point:

<rule-set target-interface="LAN1" drop="reject" comment="Default firewall rule - block incoming">
   <rule source-interface="self" comment="Allow from the FireBrick though"/>
   <rule name="SMTP" target-ip="81.x.xxx.190" target-port="25"/>
   <rule name="IAX2" target-ip="81.x.xxx.189" target-port="4569"/>
</rule-set>

For debugging, you can add log="true" and/or graph="xyz" to the <rule .../> lines, which will then print an entry to the log when the rule is matched, and will also draw graphs for that traffic, e.g.:

VoIP Rules

If you have VoIP phones on your LAN, then here are some example rules to allow SIP and RTP from the AAISP phone servers:

<rule-set name="Incoming Firewall Rules">
<rule name="SIP" source-ip="81.187.30.110-119" target-ip="192.0.2.0/28" target-port="5060-5069"/>
<rule name="RTP" target-ip="192.0.2.0/28" protocol="17" target-port="1025-5059 5070-" set-graph="RTP"/>
</rule-set>

Here the rules are defined in a rule-set. rule-sets allow helpful management of rules. Ie you can have a couple of main rule sets for example for Incoming Traffic, Port Maps, Outgoing Traffic etc. Rules and rule-sets are processed in order, top to bottom.

This also sets a graph for RTP, you may want to restrict the target to just your VoIP phones, as the above set the target at the whole of the LAN

Restricting FireBrick Config access

You may only want to allow access to the FireBrick webserver from your LAN, do this in the http service, e.g., change the current line to:

<http allow="192.0.2.1/28"/>

Native IPv6

Assuming you have an IPv6 block allocated to your line on Clueless and you're using the FB for PPPoE, then all the FB config needs is:

  • An IPv6 address on the LAN subnet
  • ra="true" in the subnet

Your computers should then get IPv6 details. test on http://ip.help.me.uk.

If you previously had your IPv6 allocation routed over a Protocol 41 tunnel to a tunnel end-point machine on your LAN, you now need to remove that on clueless to allow native IPv6 to the FB. Log in to clueless and simply clear the IPv4 endpoint address, and save the changes. You then need to drop the connection to AAISP, and re-connect, for the routing change to take effect. Also remember to shut down your LAN tunnel endpoint, so it's not still announcing routes it can't honour any more.

If you still need to use Tunnelled IPv6, rather than Native, see this page: *FireBrick 2700 v6 Tunnel

So, our config will look like this:

<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="[[IPv6]] LAN"/>
...
</interface>
...

Our complete config now looks like:

<?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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="LAN3" ports="3"/>
<port name="WAN1" ports="4"/>
<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" comment="[[IPv6]] LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
</interface>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true"/>
<services>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
<ntp timeserver="90.155.53.32 2001:8B0:0:53::5A9B:3520"/>
<telnet allow="192.0.2.0/28"/>
<http/>
</services>
<rule-set target-interface="LAN1" drop="reject" comment="default firewall rule - block incoming">
<rule source-interface="self" comment="allow from the FireBrick though"/>
</rule-set>
</config>

DNS auto-config:

( since release V0.02.039 )

Setting 'ra=true' will enable auto-configuration of IPv6 addresses, and of the Default Route. You may also wish to configure IPv6 DNS servers ( DNS servers that are to be queried over IPv6 ).

There are a couple of different mechanisms available to push out IPv6 DNS servers, and the FB2700 supports both. Be sure your DNS server actually responds on its IPv6 address!

The first method is to have the FB include the DNS server addresses as a new option( RDNSS ) in the Router Announcements. ( RFC6106 ). RFC6106 aware clients are, however, somewhat thin on the ground at the moment. To enable this, set the 'ra-dns' option to point to your IPv6 Recursive DNS Server. In this example, I'm pointing it to a DNS server on 2001:8B0:B7:1::2.

<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-dns="2001:8B0:123:1::2"/>

This will make the FB include the RDNSS option in the Router Announcements. If the client is smart enough, this is all it will take.

Most clients are not currently able to receive this option. So we can also use the more traditional method: Setting the 'O' flag in the RA, telling the client to do DHCPv6 after auto-configuration, and request 'Other' config data, i.e. DNS.

<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="true"/>

Now, the FB will set the 'O' flag in the RAs, causing your clients to then query a DHCPv6 server for 'Other' ( DNS ) config data. You must provision an external DHCPv6 server to respond to these queries.

The FB can be also be configured to run a mini-DHCPv6 server to respond to these queries by itself, eliminating the need for an external DHCPv6 server. To enable the 'O' flag AND the mini-DHCPv6, set the ra-other option to 'dhcpv6', and also specify the DNS server address to be doled out in the rd-dns option:

<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2"/>

Now, the clients are instructed to do DHCPv6, and this FB will respond with the addresses listed. Future releases may support the Search List options, too.

Tested with: Win 7, Win Vista

Note: It's not always clear on the win boxes whether this worked. On a Vista box, the command 'ipconfig /all' will show both IPv4 and IPv6 DNS servers configured. Win7 seems lame, and only reports IPv4. To show the IPv6 DNS servers, you need to use the command 'netsh interface ipv6 show dns'.

Next Steps, Bonding a Second Line

More info on http://www.firebrick.co.uk/fb2700/bonding.php ADSL and FTTC lines can be bonded, typically A&A customers bond a BT and a Be line for greater resilience. Multiple FTTC lines can be bonded together too in the same way.

Set up second PPPoE

Set up port 3 to connect to the second modem you have, i.e.:

<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true"/>

and change the port from:

<port name="LAN3" ports="3"/>

to

<port name="WAN2" ports="3"/>

If you prefer, you can rearrange the ports so that they are in sequential order etc...

We now have:

  • Port 1 = LAN
  • Port 2 = Spare
  • Port 3 = ADSL Line 2
  • Port 4 = ADSL Line 1

Bond the PPPoE

Bonding on a 2700 requires the Bonding capability - found on the Fully-Loaded and Bonding variants.

Simply setting speed=x in the ppp config will bond the PPPoE for uplink. The speed value is in bits per sec. You can use G/M/K when specifying the value, as well as B for bytes, or i, power of 2. e.g., 1000000 is the same as 1M)

e.g.:

<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" speed="1000000"/>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true" speed="1000000"/>

Since each PPP connection will give the FireBrick a default route, the FireBrick will use both, and upload traffic on each ppp connection up to the speed given. The speed is in bits, so this example is where the upload is 1M. If the upload is different on the lines, then that's fine - e.g., you may have a line using Annex-A and one Annex-M. Setting the speed correctly will mean the correct amount of traffic will be sent up each line.

Our config now 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/xml/fb2700/0.00.605.xsd" timestamp="1970-01-01T00:00:07Z">
<user name="john" timeout="PT20M" level="DEBUG" password="secret"/>
<port name="LAN1" ports="1"/>
<port name="LAN2" ports="2"/>
<port name="WAN2" ports="3"/>
<port name="WAN1" ports="4"/>
<interface name="LAN1" port="LAN1">
<subnet ip="2001:8B0:123:1::1/64" ra="true" ra-other="dhcpv6" ra-dns="2001:8B0:123:1::2" comment="[[IPv6]] LAN"/>
<subnet ip="192.0.2.1/28" comment="LAN"/>
<dhcp ip="192.0.2.2-12"/>
</interface>
<ppp port="WAN1" username="abc@a.1" password="secret" comment="BT ADSL" graph="BT ADSL" log="true" speed="1000000"/>
<ppp port="WAN2" username="abc@a.2" password="secret" comment="BT ADSL" graph="BT ADSL 2" log="true" speed="1000000"/>
<services>
<dns domain="yourdomain.tld" resolvers="217.169.20.20 217.169.20.21"/>
<ntp timeserver="90.155.53.32 2001:8B0:0:53::5A9B:3520"/>
<telnet allow="192.0.2.0/28"/>
<http/>
</services>
<rule-set target-interface="LAN1" drop="reject" comment="default firewall rule - block incoming">
<rule source-interface="self" comment="allow from the FireBrick though"/>
</rule-set>
</config>

Setting up 3G Fallback

If you have an AA data SIM, the FireBrick can configured to use this as a backup connection, by using a 3G dongle plugged into the USB port. Any routed legacy IP blocks will continue to work across this link, but so far IPv6 isn't supported. The FireBrick is known to support the ZTE MF112 Dongle and some Huawei dongles. Others may work too. The basic config is:

<usb>
<dongle username="startup_user@startup_domain" password=""/>
</usb>

Provided you use your AA username and password, then that's all you need to get the dongle configured. If your main broadband connection goes down, the FireBrick will automatically switch to use the 3G connection, then back again once your main connection is back.

Also see FireBrick 3G Dongle, which has more information about 3G fallback

Set Ports 1 and 2 to be a switch

To make use of port 2, we can configure it to be another LAN1 port. Our current port config is:

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

We can change this to make port 2 a LAN1 port:

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

Now ports 1 and 2 act as a switch on the LAN interface, and ports 3 and 4 are connected to the 2 ADSL modems.

Other Things

Accessing the Modem

The modem, or ADSL router in bridge mode, will also have a LAN IP that you can use to get to its config pages etc. e.g., the ZyXEL P660-R will still have a LAN setting, with an IP set. For the purpose of this example, let's assume the modem is on 192.168.1.2 mask 255.255.255.0.

In order to talk to the Modem from the LAN side of the FireBrick, a Subnet on the FireBrick needs to be made. This subnet would be on the WAN Interface, e.g.:

<interface name="WAN" port="WAN1">
   <subnet ip="192.168.1.1/24" comment="IP subnet on WAN for router config"/>
</interface>

Static Routes

The previous config will put the FB on 192.168.1.1, and allow the FB to route IP packets between your LAN subnet and the 192.168.1 subnet. However, at this stage, you may find you are still unable to ping the modem on the WAN port. This is because although packets from your 81.x.x.x address are correctly routed to the modem, the modem itself knows no route back to 81.x.x.x. It know nothing of the FB. So we need to tell it by setting a static route.

ZyXel P-660R

You will have configured the IP and Netmask on the 'LAN' tab. But there's no 'Gateway', so we must go to 'Advanced' -> 'Static Routes' tab, and create one. Enter it as follows: IP, Mask = base address of your internal LAN; e.g.: 81.xx.xx.0, 255.255.255.192. The 'Gateway' address is pointing back at the FB, e.g. 192.168.1.1. Check the box to Activate the route, hit the 'Apply' button, and that's it done.

Vigor 120

You need to telnet in to the CLI to set the route. The commands to set a route back to 81.x.x.0 via the FB at 192.168.1.1 are:

ip route status
ip route add 81.x.x.0 255.255.255.192 192.168.1.1 static
ip route status 

Once this is confirmed working, you should do a:

sys commit 

to save it to flash, otherwise it's lost on power-down.

The Draytek CLI reference may be found here: ftp://ftp.draytek.com/Document/Telnet_Commands_V1.11.zip

Now, the assuming the Modem is on 192.168.1.2, you'll be able to access it from the LAN side of the FireBrick.

Other, other things

You may want to look at the Category:FireBrick page as there are examples there from setting up OTP, syslog, auto-updates and so on.