<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ampr.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=4Z5YR</id>
	<title>44Net Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ampr.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=4Z5YR"/>
	<link rel="alternate" type="text/html" href="https://wiki.ampr.org/wiki/Special:Contributions/4Z5YR"/>
	<updated>2026-04-26T23:36:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=677</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=677"/>
		<updated>2016-11-06T20:09:00Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
This guide covers only one tunnel to the master AMPRnet gateway at UCSD. This guide doesn&#039;t cover the automatic setup of tunnels to other gateways.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
Picture [TBD]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
&lt;br /&gt;
       Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained.&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Talk:OH7LZB_VPN&amp;diff=615</id>
		<title>Talk:OH7LZB VPN</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Talk:OH7LZB_VPN&amp;diff=615"/>
		<updated>2016-06-18T22:18:01Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: Created page with &amp;quot;Hi, LOTW private key certificate is a PKCS12 format (p12 file) To use it with AMPR VPN, you need to first convert it using openssl.  Example: openssl pkcs12 -in &amp;lt;callsign&amp;gt;.p12...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
LOTW private key certificate is a PKCS12 format (p12 file)&lt;br /&gt;
To use it with AMPR VPN, you need to first convert it using openssl.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
openssl pkcs12 -in &amp;lt;callsign&amp;gt;.p12 -out &amp;lt;callsign&amp;gt;.cer&lt;br /&gt;
&lt;br /&gt;
from this text file, copy the private key section&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=606</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=606"/>
		<updated>2016-06-10T17:01:00Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* The plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
Picture [TBD]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
&lt;br /&gt;
       Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained.&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=605</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=605"/>
		<updated>2016-06-10T17:00:15Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
&lt;br /&gt;
       Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained.&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=604</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=604"/>
		<updated>2016-06-10T16:59:54Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
&lt;br /&gt;
       Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=603</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=603"/>
		<updated>2016-06-10T16:58:52Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Initial setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console from your home LAN only&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=602</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=602"/>
		<updated>2016-06-10T16:57:30Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Initial setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=601</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=601"/>
		<updated>2016-06-10T16:57:13Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Initial setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
&lt;br /&gt;
The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=600</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=600"/>
		<updated>2016-06-10T16:56:15Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Warning!! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.&lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=599</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=599"/>
		<updated>2016-06-10T16:53:32Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* The plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=598</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=598"/>
		<updated>2016-06-10T16:44:51Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=597</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=597"/>
		<updated>2016-06-10T16:44:21Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
&lt;br /&gt;
       • For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=596</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=596"/>
		<updated>2016-06-10T16:43:35Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
       • For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
       • Press the + Add Interface button.&lt;br /&gt;
&lt;br /&gt;
       • Select tun0 as the interface and select in as the direction.&lt;br /&gt;
&lt;br /&gt;
       • Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=595</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=595"/>
		<updated>2016-06-10T16:42:59Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
&lt;br /&gt;
Press the + Add Interface button.&lt;br /&gt;
&lt;br /&gt;
Select tun0 as the interface and select in as the direction.&lt;br /&gt;
&lt;br /&gt;
Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=594</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=594"/>
		<updated>2016-06-10T16:42:28Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
       • Select the Firewall/NAT tab&lt;br /&gt;
       • Select firewall policies tab&lt;br /&gt;
There should be two rulesets&lt;br /&gt;
       o WAN_IN&lt;br /&gt;
       o WAN_LOCAL&lt;br /&gt;
For each rule, press the actions button on the right and select the interfaces option.&lt;br /&gt;
Press the + Add Interface button.&lt;br /&gt;
Select tun0 as the interface and select in as the direction.&lt;br /&gt;
Finish by pressing the Save Ruleset button.&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=593</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=593"/>
		<updated>2016-06-10T16:37:31Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Finishing touches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
In configuration mode enter the following&lt;br /&gt;
        • ubnt@ubnt:~$ save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=592</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=592"/>
		<updated>2016-06-10T16:36:15Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Smoke test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response, you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=591</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=591"/>
		<updated>2016-06-10T16:32:59Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Smoke test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel.&lt;br /&gt;
&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Finishing touches ==&lt;br /&gt;
&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=590</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=590"/>
		<updated>2016-06-10T16:31:23Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up the tunnel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=589</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=589"/>
		<updated>2016-06-10T16:30:40Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Initial setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=588</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=588"/>
		<updated>2016-06-10T16:29:42Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=587</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=587"/>
		<updated>2016-06-10T16:29:09Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=586</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=586"/>
		<updated>2016-06-10T16:28:55Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=585</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=585"/>
		<updated>2016-06-10T16:28:18Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure the following happen:&lt;br /&gt;
&lt;br /&gt;
       • Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
       • Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=584</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=584"/>
		<updated>2016-06-10T16:27:18Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed.&lt;br /&gt;
 &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=583</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=583"/>
		<updated>2016-06-10T16:26:45Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
• Normal routing for your home computers LAN is maintained&lt;br /&gt;
• Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=582</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=582"/>
		<updated>2016-06-10T16:25:44Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
        • Normal routing for your home computers LAN is maintained&lt;br /&gt;
        • Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
        • ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
        • ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Smoke test ==&lt;br /&gt;
&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=581</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=581"/>
		<updated>2016-06-10T16:23:53Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
       IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
       S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
       C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
       C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
       C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=580</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=580"/>
		<updated>2016-06-10T16:23:16Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up source address routing policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
&lt;br /&gt;
IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=579</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=579"/>
		<updated>2016-06-10T16:22:18Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up the tunnel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
        • ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
        • description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
        • encapsulation ipip&lt;br /&gt;
        • local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
        • remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up source address routing policy ==&lt;br /&gt;
&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP.&lt;br /&gt;
In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
        • ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=578</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=578"/>
		<updated>2016-06-10T16:19:34Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Setting up the tunnel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
In configuration mode enter the following commands&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
•	ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
•	description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
•	encapsulation ipip&lt;br /&gt;
•	local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
•	remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
Setting up source address routing policy&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP. In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
•	ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=577</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=577"/>
		<updated>2016-06-10T16:10:35Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* Assumptions / Pre requisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
•	ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
•	description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
•	encapsulation ipip&lt;br /&gt;
•	local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
•	remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
Setting up source address routing policy&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP. In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
•	ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=576</id>
		<title>Setting up a gateway on Ubiquiti EdgeRouter</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Setting_up_a_gateway_on_Ubiquiti_EdgeRouter&amp;diff=576"/>
		<updated>2016-06-10T16:08:12Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: Created page with &amp;quot; == Setting up a gateway on Ubiquiti EdgeRouter ==  EdgeRouter is a low cost professional grade router made by Ubiquiti. All routers in the product family such as EdgeRouter X...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Setting up a gateway on Ubiquiti EdgeRouter ==&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is a low cost professional grade router made by Ubiquiti.&lt;br /&gt;
All routers in the product family such as EdgeRouter X, EdgeRouter Lite and EdgeRouter PoE run the EdgeOS router operating system.&lt;br /&gt;
EdgeOS seems to be an OEM version of Vyatta (now Brocade) and Vyos (an open source version).&lt;br /&gt;
The commands are almost identical so with little adjustments this guide could serve the different variant.&lt;br /&gt;
&lt;br /&gt;
EdgeRouter is appealing to anyone interested in setting up a gateway to AMPRNet due to the built in support for the IPIP tunneling protocol.&lt;br /&gt;
This guide was created based on my experience with setting up a gateway to AMPRNet using the EdgeRouter PoE model.&lt;br /&gt;
I haven&#039;t tested it on other models, but since they all use the same OS, it should work with minimal adjustment if any.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Assumptions / Pre requisites ==&lt;br /&gt;
&lt;br /&gt;
•	You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file&lt;br /&gt;
•	You have registered some hosts in the AMPRNet DNS like &amp;lt;your call sign&amp;gt;.ampr.org&lt;br /&gt;
•	Your EdgeRouter is upgraded to the latest EdgeOS (currently version 1.8)&lt;br /&gt;
•	You have used the wizard to set your router as WAN+2LAN, where:&lt;br /&gt;
        •    Interface eth1 is your connection to your ISP&lt;br /&gt;
        •    Interface eth2 is your home LAN where your computers are connected&lt;br /&gt;
        •    Interface eth0 is a second LAN, unused mapped to 192.168.1.1/24&lt;br /&gt;
•	You have successfully setup the EdgeRouter and it is connected to the internet and providing service to your home computers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The plan ==&lt;br /&gt;
&lt;br /&gt;
As shown in figure 1.1, we will use eth0 as our AMPRNet LAN where computers and other devices with assigned AMPRNet address&lt;br /&gt;
will connect via an IPIP tunnel to the UCSD AMPRNet gateway and the internet.&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
 &lt;br /&gt;
Figure 1.1 the network plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning!! ==&lt;br /&gt;
&lt;br /&gt;
The author does not assume responsibility for you messing up/bricking your router. Please make sure to back up your EdgeRouter configuration prior to any change.&lt;br /&gt;
Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails. &lt;br /&gt;
&lt;br /&gt;
== Initial setup ==&lt;br /&gt;
&lt;br /&gt;
•	Open the CLI using the GUI button or connect using an ssh client such as PuTTY to 192.196.2.1.&lt;br /&gt;
        The default username/password is ubnt/ubnt unless you have already changed it.&lt;br /&gt;
•	Enter configuration mode&lt;br /&gt;
        • ubnt@ubnt:~$ configuration&lt;br /&gt;
•	Limit access to GUI only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service gui listen-address 192.168.2.1&lt;br /&gt;
•	Limit access to ssh console only from home LAN&lt;br /&gt;
        • ubnt@ubnt:~$  set service ssh listen-address 192.168.2.1&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
•	Delete the network assignment of eth0&lt;br /&gt;
        • ubnt@ubnt:~$  delete interfaces ethernet eth0 address 192.168.1.1/24&lt;br /&gt;
•	Set the AMPRNet network assignment you have received to eth0&lt;br /&gt;
        • ubnt@ubnt:~$  set interfaces ethernet eth0 address &amp;lt;put your AMPRNet network assignment&amp;gt;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
        • ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the tunnel ==&lt;br /&gt;
&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 local-ip &amp;lt;put the external ip assigned to you by your ISP&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 remote-ip 169.228.66.251&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 encapsulation ipip&lt;br /&gt;
•	ubnt@ubnt:~$  set interfaces tunnel tun0 description &amp;quot;Tunnel to AMPRNet gateway&amp;quot;&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
•	To verify your input so far, enter the following command&lt;br /&gt;
•	ubnt@ubnt:~$  show interfaces tunnel tun0&lt;br /&gt;
•	The output should look like this&lt;br /&gt;
•	description &amp;quot;Tunnel to AMPRNet&amp;quot;&lt;br /&gt;
•	encapsulation ipip&lt;br /&gt;
•	local-ip &amp;lt;your assigned ISP address&amp;gt;&lt;br /&gt;
•	remote-ip 169.228.66.251&lt;br /&gt;
&lt;br /&gt;
Setting up source address routing policy&lt;br /&gt;
Most likely your home computers LAN is setup to route to any internet destination via the interface connected to the ISP. In addition, all your private ip addresses are being masqueraded before getting to the outside world.&lt;br /&gt;
Entering the following command (in operational mode) will print the routing table&lt;br /&gt;
•	ubnt@ubnt:~$  show ip route&lt;br /&gt;
&lt;br /&gt;
You should get something similar to this routing table&lt;br /&gt;
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP&lt;br /&gt;
       O - OSPF, IA - OSPF inter area&lt;br /&gt;
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2&lt;br /&gt;
       E1 - OSPF external type 1, E2 - OSPF external type 2&lt;br /&gt;
       &amp;gt; - selected route, * - FIB route, p - stale info&lt;br /&gt;
IP Route Table for VRF &amp;quot;default&amp;quot;&lt;br /&gt;
S    *&amp;gt; 0.0.0.0/0 [210/0] via &amp;lt;your ISP default gateway&amp;gt;, eth1&lt;br /&gt;
C    *&amp;gt; &amp;lt;your ISP network&amp;gt; is directly connected, eth1&lt;br /&gt;
C    *&amp;gt; 127.0.0.0/8 is directly connected, lo&lt;br /&gt;
C    *&amp;gt; 192.168.2.0/24 is directly connected, switch0&lt;br /&gt;
&lt;br /&gt;
0.0.0.0/0 basically means &amp;quot;every ip address&amp;quot;&lt;br /&gt;
We want to make sure of the following:&lt;br /&gt;
•	Normal routing for your home computers LAN is maintained&lt;br /&gt;
•	Your AMPRNet hosts are being routed to the tunnel to connect to the internet. No masquerading is needed. &lt;br /&gt;
Let&#039;s define source address routing policy that will make sure only AMPRNet hosts are routed to the tunnel&lt;br /&gt;
•	ubnt@ubnt:~$ set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface tun0&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 description &#039;traffic to AMPRNet&#039;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 source address &amp;lt;put your AMPRNet assigned network&amp;gt;&lt;br /&gt;
•	ubnt@ubnt:~$ set firewall modify SOURCE_ROUTE rule 10 modify table 1&lt;br /&gt;
•	ubnt@ubnt:~$ set interfaces ethernet eth0 firewall in modify SOURCE_ROUTE&lt;br /&gt;
&lt;br /&gt;
•	Now commit the changes&lt;br /&gt;
•	ubnt@ubnt:~$  commit&lt;br /&gt;
&lt;br /&gt;
Smoke test&lt;br /&gt;
To test our configuration, we first need to connect a computer to the EdgeRouter interface eth0 and manually assign an ip address from our assigned AMPRNet network range that has already been registered with the DNS.&lt;br /&gt;
To test that we are accessible from the outside world, use a &amp;quot;ping service&amp;quot; such as ping.eu to ping the above mentioned host. If you see response, this basically means that the tunnel is working! (At least from the outside in)&lt;br /&gt;
To see that our source routing policy works, ping an external host such as google DNS server @ 8.8.8.8. If you see a response you at least know that your above mentioned host is reaching the internet.&lt;br /&gt;
To verify that we are exiting the router via the tunnel, do a traceroute command to 8.8.8.8. If in the trace you see some ucsd.edu host, you know that you are using the tunnel&lt;br /&gt;
The last test we can do is to use a site like whatismyip.com to see the address which we are coming from. If it is the address is the above mentioned host, then we have successfully setup the AMPRNet gateway.&lt;br /&gt;
Finishing touches&lt;br /&gt;
If you have reached so far and everything is working correctly, it is time to save our configuration.&lt;br /&gt;
•	In configuration mode enter the following&lt;br /&gt;
•	Save&lt;br /&gt;
&lt;br /&gt;
Since we have now an open tunnel to the world ending in our EdgeRouter, we need to extend our firewall protection to interface tun0. This can easily be done in the EdgeRouter GUI.&lt;br /&gt;
•	Select the Firewall/NAT tab&lt;br /&gt;
•	Select firewall policies tab&lt;br /&gt;
•	There should be two rulesets&lt;br /&gt;
o	WAN_IN&lt;br /&gt;
o	WAN_LOCAL&lt;br /&gt;
•	For each rule, press the actions button on the right and select the interfaces option&lt;br /&gt;
•	Press the + Add Interface button&lt;br /&gt;
•	Select tun0 as the interface and select in as the direction&lt;br /&gt;
•	Finish by pressing the Save Ruleset button&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
	<entry>
		<id>https://wiki.ampr.org/w/index.php?title=Archive/Main_Page&amp;diff=575</id>
		<title>Archive/Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.ampr.org/w/index.php?title=Archive/Main_Page&amp;diff=575"/>
		<updated>2016-06-10T15:59:13Z</updated>

		<summary type="html">&lt;p&gt;4Z5YR: /* How to connect to AMPRNet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the AMPRNet Wiki.&lt;br /&gt;
&lt;br /&gt;
Since its allocation to Amateur Radio in the mid-1980&#039;s, Internet network 44 (44.0.0.0/8), known as the AMPRNet™, has been used by amateur radio operators to conduct scientific research and to experiment with digital communications over radio with a goal of advancing the state of the art of Amateur Radio networking, and to educate amateur radio operators in these techniques. - [http://www.ampr.org/ www.ampr.org]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
== Starting points ==&lt;br /&gt;
* Basic information about the [[AMPRNet]] and the [[ampr.org]] domain&lt;br /&gt;
* [[Services]] available on AMPRNet&lt;br /&gt;
* If you are looking to get an IP allocation within the 44/8 AMPRNet please read the [[Portal]] page.&lt;br /&gt;
* Frequently Asked Questions (FAQ) [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
== How to connect to AMPRNet ==&lt;br /&gt;
&lt;br /&gt;
* Instructions for [[Setting up a gateway on Linux|setup a Linux gateway]]&lt;br /&gt;
* Instructions for [[setting up a gateway on Cisco Routers|setting up a  gateway on Cisco Routers]].&lt;br /&gt;
* Instructions for [[setting up a gateway on MikroTik Routers|setting up a  gateway on MikroTik Routers]].&lt;br /&gt;
* Instructions for [[setting up a gateway on OpenWRT|setting up a gateway on OpenWRT]].&lt;br /&gt;
* Instructions for [[setting up a gateway on Ubiquiti EdgeRouter|setting up a gateway on Ubiquiti EdgeRouter]].&lt;br /&gt;
* Instructions for [[announcing your allocation directly|directly announcing your allocation via your Internet Service Provider (ISP)]].&lt;br /&gt;
* Instructions for [[AMPRNet VPN|Accessing AMPRNet via VPN]] (experimental).&lt;br /&gt;
* &amp;lt;b&amp;gt;[[Why can&#039;t I just route my AMPRNet allocation directly myself ?]]&amp;lt;/b&amp;gt;&lt;br /&gt;
* If you already operate a [[gateway]] please ensure you have registered on the [[portal]] and &amp;quot;claimed&amp;quot; your [[gateway]].&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
To keep up-to-date on AMPRNet information please consider joining the [[44Net mailing list]].&lt;br /&gt;
&lt;br /&gt;
== Contribute! ==&lt;br /&gt;
If you wish to contribute to the wiki, please send an email to &amp;lt;tt&amp;gt;wiki (at) ampr.org&amp;lt;/tt&amp;gt; introducing yourself. Please specify your full name, amateur radio callsign and your preferred username. A login will then be created for you.&lt;br /&gt;
&lt;br /&gt;
== Terms of Service ==&lt;br /&gt;
Use of 44.0.0.0/8 address space and ampr.org DNS is governed by the following [http://www.ampr.org/tos.txt Terms of Service]&lt;br /&gt;
&lt;br /&gt;
== All Pages ==&lt;br /&gt;
[http://wiki.ampr.org/wiki/Special:AllPages Here&#039;s a list of all pages currently on the AMPRNet Wiki]&lt;/div&gt;</summary>
		<author><name>4Z5YR</name></author>
	</entry>
</feed>