{"id":389,"date":"2008-10-23T13:51:17","date_gmt":"2008-10-23T20:51:17","guid":{"rendered":"http:\/\/www.1oc.com\/blog\/?p=5"},"modified":"2008-10-23T13:51:17","modified_gmt":"2008-10-23T20:51:17","slug":"multi-wan-optus-and-telstra-cable-with-pfsense","status":"publish","type":"post","link":"http:\/\/blog.1oc.com\/?p=389","title":{"rendered":"Multi-WAN Optus and Telstra Cable with pfSense."},"content":{"rendered":"<p>\u00a0<\/p>\n<div id=\"p31970\" class=\"post bg2\">\n<div class=\"inner\">\n<div class=\"postbody\">\n<div class=\"content\">This is an example of how you set up pfSense to support multiple ISPs.\u00a0\u00a0\u00a0<\/p>\n<p>WTF is pfSense? Look here&#8230;\u00a0<br \/>\n=&gt;\u00a0<a class=\"postlink\" href=\"http:\/\/www.pfsense.com\/\">http:\/\/www.pfsense.com\/<\/a>\u00a0<\/p>\n<p>This guide will show you how to setup two connections that require DHCP.\u00a0<\/p>\n<p>You can extend this to 3, 4, 5, etc connections, as many as your\u00a0motherboard can handle.\u00a0<\/p>\n<p>In this example, I demonstrate the use of a simple routing policy to\u00a0assign one PC to use Optus Cable, and the other PC to use Telstra Cable.\u00a0<\/p>\n<p>Before I go forward, if you have Telstra Cable, be sure this works first.\u00a0<br \/>\nMake sure you can connect to it via pfSense before proceeding.\u00a0<br \/>\npfSense has a bpalogin client for this, so you do NOT need to use the\u00a0Telstra client program anymore.\u00a0<\/p>\n<p>Once you know your ISPs work fine with pfSense, then proceed.\u00a0<\/p>\n<p><span>Test setup for pfSense (router\/firewall) box&#8230;<\/span>\u00a0<br \/>\n* Celeron 1.2Ghz\u00a0<br \/>\n* 512MB RDRAM\u00a0<br \/>\n* i820 chipset mobo (ASUS P3C-D)\u00a0<br \/>\n* 3x Intel NICs (i82559 chipset)\u00a0<br \/>\n* CD-ROM\u00a0<br \/>\n* Floppy\u00a0<br \/>\n* pfSense 0.95 LiveCD\u00a0<br \/>\n* ISP1 : Telstra Broadband Cable (10Mbit\/128k)\u00a0<br \/>\n* ISP2 : Optus Cable (10Mbit\/256k)\u00a0<\/p>\n<p>Regarding system requirements : Because pfSense is aimed for the\u00a0business class, the requirements are hefty compared to other solutions.\u00a0<\/p>\n<p>Its recommended that you get at least a PII\/PIII, Duron, VIA C3, etc if\u00a0you want all the features. Its also recommended that you have 128MB or\u00a0more RAM. I&#8217;ve tried pfSense on a Pentium 150Mhz with 48MB RAM, but\u00a0its quite sluggish.\u00a0<\/p>\n<p>In the case of Multi-WAN, it is better to get something with more RAM\u00a0and grunt, with quality brand of network cards. (Used or 2nd hand Intel\u00a0NICs are quite cheap, and perfect for this role).\u00a0<\/p>\n<p>If you have a WRAP or Soekris embedded board, you can use that, as\u00a0pfSense has a version for this class of platform.\u00a0<\/p>\n<p>ALSO NOTE: I&#8217;ve used a CD-ROM\/Floppy as the test platform for this guide.\u00a0<br \/>\nBe aware that it is recommended that you use a hard disk.\u00a0<\/p>\n<p>If you want, you can use a Compact Flash card with CF to IDE adapter OR\u00a0Use a Disk-On-Module (DOM)&#8230;But make sure you disable swap file by\u00a0deleting the swap partition. (Do this when you install pfSense).\u00a0<\/p>\n<p>It is necessary to disable swap for DOMs and CF implementations due\u00a0to their limited number of writes. (I think its about 10,000 before it dies).\u00a0<\/p>\n<p>Bare in mind, some functions rely on a swap partition, so they may not\u00a0function properly without swap. If you don&#8217;t need those functions, don&#8217;t\u00a0worry about it.\u00a0<\/p>\n<p><span>Network card assignments<\/span>\u00a0<br \/>\n1st network card =&gt; fxp0 =&gt; LAN\u00a0<br \/>\n2nd network card =&gt; fxp1 =&gt; WAN\u00a0<br \/>\n3rd network card =&gt; fxp2 =&gt; OPT1 (re-designated as WAN2)\u00a0<\/p>\n<p>I&#8217;m using three network cards which are the same, this is why they will\u00a0be labelled fxp0, 1, and 2. Remember, PCs start with 0, not 1.\u00a0<br \/>\nI also needed to note down the MAC addresses of each card as a result.\u00a0<\/p>\n<p>WAN = This connects to your 1st ISP.\u00a0<\/p>\n<p>OPT1 = Optional 1 is renamed WAN2. This connects to your 2nd ISP.\u00a0<br \/>\n(If you have more NICs, they&#8217;ll be called OPT2, 3, 4, etc. You can rename\u00a0later when you login to pfSense via web browser&#8230;)\u00a0<\/p>\n<p>LAN = This connects to your PC or a switch for your network behind the\u00a0firewall.\u00a0<\/p>\n<p>SO, in this example&#8230;\u00a0<\/p>\n<p><span>WAN<\/span>\u00a0=&gt; Telstra Cable (due to bpalogin being needed) =&gt; BigPond (DHCP)\u00a0<br \/>\n<span>WAN2<\/span>\u00a0=&gt; Optus Cable (DHCP)\u00a0<br \/>\nLAN =&gt; Static IP (labelled as 192.168.1.1)\u00a0<\/p>\n<p>NOTE : Be aware that WAN2, 3, 4 and so on, only supports DHCP or Static\u00a0IP. If you need PPPoE, etc, you need to stick a modem with ethernet port\u00a0in front of the pfSense box.\u00a0<\/p>\n<p>IP address of PC 1 on the LAN side =&gt; 192.168.1.10\u00a0<br \/>\nIP address of PC 2 on the LAN side =&gt; 192.168.1.12\u00a0<\/p>\n<p>I point PC 1 to WAN (Telstra) and PC 2 to WAN2 (Optus)\u00a0<\/p>\n<p><span>Network Layout (For this guide)<\/span>\u00a0<\/p>\n<dl class=\"codebox\">\n<dt> <\/dt>\n<dd><code>WAN (Telstra)\u00a0 \u00a0 \u00a0 \u00a0WAN2 (Optus)<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0\/<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 pfSense<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 8-Port Switch<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 |\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0PC 1\u00a0 \u00a0 \u00a0 \u00a0 PC 2<br \/>\n<\/code><\/dd>\n<\/dl>\n<p><span>My settings in pfSense&#8230;<\/span><\/p>\n<p>Firstly, you need to tell pfSense&#8217;s NAT that connections from the LAN can\u00a0go to your WAN connections. (Connections to your Cable\/ADSL\/modem\/etc. Anything that accepts ethernet.)<\/p>\n<p>For\u00a0<span>Firewall<\/span>\u00a0=&gt;\u00a0<span>NAT<\/span>\u00a0Settings&#8230;<br \/>\nI&#8217;ve checked\u00a0<span>Enable advanced outbound NAT<\/span>\u00a0in the\u00a0<span>Outbound<\/span>\u00a0section.<\/p>\n<dl class=\"codebox\">\n<dt> <\/dt>\n<dd><code>Interface\u00a0 \u00a0Source\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Destination\u00a0 \u00a0 \u00a0Destination Port\u00a0 \u00a0 \u00a0NAT Address\u00a0 \u00a0NAT Port\u00a0 \u00a0Description<br \/>\nWAN\u00a0 \u00a0 \u00a0 \u00a0 \u00a0192.168.1.0\/24\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 For Telstra<br \/>\nWAN2\u00a0 \u00a0 \u00a0 \u00a0 192.168.1.0\/24\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 For Optus<br \/>\n<\/code><\/dd>\n<\/dl>\n<p>The * under\u00a0<span>Destination<\/span>,\u00a0<span>Destination Port<\/span>,\u00a0<span>NAT Address<\/span>\u00a0and\u00a0<span>NAT Port<\/span>\u00a0is the &#8220;any&#8221; option in pfSense.<\/p>\n<p>Now the following is where you define specific firewall rules.<br \/>\nThis is where you control which PC\/system uses which ISP.<\/p>\n<p>For\u00a0<span>Firewall<\/span>\u00a0=&gt;\u00a0<span>Rules<\/span>\u00a0Settings&#8230;<\/p>\n<dl class=\"codebox\">\n<dt> <\/dt>\n<dd><code>Proto\u00a0 \u00a0Source\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Port\u00a0 \u00a0Destination\u00a0 \u00a0Port\u00a0 \u00a0Gateway\u00a0 \u00a0Description<br \/>\n*\u00a0 \u00a0 \u00a0 \u00a0192.168.1.10\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0PC 1 -&gt; Telstra\u00a0 \u00a0 \u00a0<br \/>\n*\u00a0 \u00a0 \u00a0 \u00a0192.168.1.12\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 *\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0*\u00a0 \u00a0 \u00a0 WAN2\u00a0 \u00a0 \u00a0 PC 2 -&gt; Optus<br \/>\n<\/code><\/dd>\n<\/dl>\n<p>As before, the * under\u00a0<span>Proto<\/span>,\u00a0<span>Port<\/span>,\u00a0<span>Destination<\/span>,\u00a0<span>Port<\/span>, is the &#8220;any&#8221; option. The * under\u00a0<span>Gateway<\/span>\u00a0is the default WAN\u00a0connection. Or your 1st WAN connection.\u00a0<\/p>\n<p>That&#8217;s it.\u00a0<\/p>\n<p>NOTE : You may need to manually specify which DNS server should be\u00a0used as pfSense will sometimes use DNS servers from each WAN for\u00a0certain periods.\u00a0<\/p>\n<p>NOTE 2 : If you&#8217;re using Telstra Cable, either manually assign Telstra&#8217;s\u00a0DNS server first OR use pfSense&#8217;s default setting&#8230;ie : Let DHCP handle\u00a0everything. (Override with DHCP settings)\u00a0<\/p>\n<p>You can also set up a De-Militarised Zone (DMZ) for your servers, and\u00a0such and then manually specify rules or forward ports for your servers, etc.\u00a0<br \/>\n(If you need to forward ports, this is found in the NAT section, NOT\u00a0in the Rules section).\u00a0<\/p>\n<p>Remember, this is NOT loadbalancing. This is useful if you want to\u00a0consolidate multiple ISP connections into one router. This method is\u00a0very simple and easy to work with as you don&#8217;t need to worry about\u00a0VPN and such, like you do with loadbalancing.\u00a0<\/p>\n<p>Depending on your requirements and situation, you may find this a\u00a0cheaper approach than buying a commercial router. Its up to you to\u00a0assess if this is a viable solution for your needs.\u00a0<\/p>\n<p><span>References<\/span>\u00a0<\/p>\n<p>The pfSense FAQ\u00a0<br \/>\n<a class=\"postlink\" href=\"http:\/\/faq.pfsense.org\/\">http:\/\/faq.pfsense.org<\/a>\u00a0<\/p>\n<p>Setting up policybased routing with multiple WAN-links (PDF)\u00a0<br \/>\n<span style=\"color: #551a8b; text-decoration: underline;\"><a href=\"http:\/\/blog.1oc.com\/wp-content\/uploads\/2008\/12\/policybased_multiwan.pdf\">policybased_multiwan<\/a><\/span><\/div>\n<div id=\"sig31970\" class=\"signature\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 This is an example of how you set up pfSense to support multiple ISPs.\u00a0\u00a0\u00a0 WTF is pfSense? Look here&#8230;\u00a0 =&gt;\u00a0http:\/\/www.pfsense.com\/\u00a0 This guide will show you how to setup two connections that require DHCP.\u00a0 You can extend this to 3, &hellip; <a href=\"http:\/\/blog.1oc.com\/?p=389\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-389","post","type-post","status-publish","format-standard","hentry","category-firewalls"],"_links":{"self":[{"href":"http:\/\/blog.1oc.com\/index.php?rest_route=\/wp\/v2\/posts\/389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.1oc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.1oc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.1oc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.1oc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=389"}],"version-history":[{"count":0,"href":"http:\/\/blog.1oc.com\/index.php?rest_route=\/wp\/v2\/posts\/389\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.1oc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.1oc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.1oc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}