{"id":761,"date":"2013-08-05T15:12:21","date_gmt":"2013-08-05T13:12:21","guid":{"rendered":"http:\/\/marc.storck.lu\/blog\/?p=761"},"modified":"2013-12-14T10:47:26","modified_gmt":"2013-12-14T09:47:26","slug":"howto-setup-an-amprnet-gateway-on-linux","status":"publish","type":"post","link":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/","title":{"rendered":"HowTo setup an AMPRnet Gateway on Linux"},"content":{"rendered":"<p>I had to setup many AMPRnet gateways on Linux machines and I always had a hard time remembering the different steps, so I try to provide a quick start over here.<\/p>\n<p>I have been using the RIP44d deamon for all my installations, so we&#8217;ll start with downloading the current version of RIP44d:<\/p>\n<blockquote><p>sudo wget -O \/usr\/local\/sbin\/rip44d\u00a0https:\/\/raw.github.com\/hessu\/rip44d\/master\/rip44d<\/p><\/blockquote>\n<p>The file needs to be executable by root<\/p>\n<blockquote><p>sudo chmod 744\u00a0\/usr\/local\/sbin\/rip44d<\/p><\/blockquote>\n<p><!--more-->Next we need is a starter script which does all the magic around RIP44d, the IPIP tunnel interface, enable ip forwarding in sysctl etc, etc. I usually create a file in \/usr\/local\/sbin called startampr with the following content<\/p>\n<blockquote><p>##################################################################<br \/>\n## This script was developed by KB3VWG on a standard Ubuntu 12.04.1 LTS PC<br \/>\n## with IPv4 forwarding enabled in \/etc\/sysctl.conf by changing the<br \/>\n## net.ipv4.ip_forward variable to 1, eth0 configured to the Public facing<br \/>\n## LAN and eth1 to the 44LAN. It is designed to enable an AMPR Router using the<br \/>\n## rip44d_table44 file, the standard rip44d, using the -t switch to add routes<br \/>\n## to routing table &#8217;44&#8217; with no fruther configuration needed (firewall optional)<br \/>\n##################################################################<br \/>\n## This script was modified by LX1DUC to automate even more tasks.<br \/>\n##################################################################<\/p>\n<p>########################################<br \/>\n### ENABLE IP FORWARDING ###<br \/>\nsysctl -w net.ipv4.ip_forward=1<\/p>\n<p>########################################<br \/>\n### ENABLE IPIP TUNNEL INTERFACE tunl0 ###<br \/>\n### you must enable the tunnel before specifying routes using the tunnel<br \/>\nmodprobe ipip<br \/>\nip addr add 44.256.0.1\/32 dev tunl0<br \/>\n### gives tunnel its own TTL of 64 enabling traceroute over tunnel<br \/>\nip tunnel change ttl 64 mode ipip tunl0<br \/>\nip link set dev tunl0 up<\/p>\n<p>########################################<br \/>\n### FIREWALL TO COMPLY WITH AMPR ROUTING RULES ###<br \/>\n### REGARDING TEST SUBNET ###<br \/>\niptables -A FORWARD -s 44.128.0.0\/16 -j REJECT<br \/>\niptables -A FORWARD -d 44.128.0.0\/16 -j REJECT<\/p>\n<p>########################################<br \/>\n### LAN ROUTING RULES (required if used as the LAN&#8217;s gateway) ###<br \/>\n### Allows 44LAN to use main routing table to access LAN (optional)<br \/>\n### (NAT\/masquerade from 44.60.44.0\/24 to must be configured<br \/>\n### if LAN hosts do not use AMPR Router as their LAN Gateway)<br \/>\n#ip rule add from 44.60.44.0\/24 to table main priority 1<\/p>\n<p>########################################<br \/>\n### AMPR ROUTING RULES ###<br \/>\n### Per PE1CHL: &#8216;This is &#8220;required&#8221; to get routing of the net-44 traffic correct ###<br \/>\n### and have a default route for the tunneled traffic different from the default ###<br \/>\n### route of the system. It may be possible to get it working without this, but ###<br \/>\n### policy based routing is so much easier.&#8217; ###<br \/>\n### Packets to and from the 44 Network use Route Table 44<br \/>\nip rule add to 44.0.0.0\/8 table 44 priority 44<br \/>\nip rule add from 44.256.0.0\/24 table 44 priority 45<\/p>\n<p>########################################<br \/>\n### TABLE 44 ROUTES ###<br \/>\n### Default Route [Internet Access] using AMPRGW for 44\/8 hosts (optional)<br \/>\n### do NOT change the IP 169.228.66.251, this is the central AMPR Gateway<br \/>\n### and all traffic leaving AMPRnet towards the internet MUST pass this router.<br \/>\nip route add default dev tunl0 via 169.228.66.251 onlink table 44<br \/>\n### Leave the 44.0.0.1 route below commented if the default route is used,<br \/>\n### in which case, RIP44 will create it automatically<br \/>\n### ip route add 44.0.0.1 dev tunl0 via 169.228.66.251 onlink table 44 window 840<br \/>\n### Adds 44LAN Network to Table 44<br \/>\nip route add 44.256.0.0\/24 dev eth1 table 44<br \/>\n########################################<\/p>\n<p>### STARTS THE rip44d ROUTER DAMEON &#8211; removing the WAN IP address of the local gateway ###<br \/>\n### (rip44d announcements, 44LAN route, and removing local WAN IP with -a switch<br \/>\n### equals full AMPR routing table)<br \/>\n\/usr\/local\/sbin\/rip44d -a 192.0.2.1 -p pAsSwOrDgOeShErE -t 44 &lt; \/dev\/null &amp;<\/p><\/blockquote>\n<p>Many thanks to KB3VWG and PE1CHL.<\/p>\n<p>The file must also be executable by root<\/p>\n<blockquote><p>sudo chmod 744 \/usr\/local\/sbin\/startampr<\/p><\/blockquote>\n<p><span style=\"color: #ff0000;\"><strong>IMPORTANT<\/strong><\/span>, please replace the invalid IP address network 44.256.0.0\/24, the invalid IP address 44.256.0.1 and the documentation IP 192.0.2.1 according to your local setup:<\/p>\n<ul>\n<li>44.256.0.0\/24 must be replaced with your network and netmask (your netmask may differ from \/24!!!)<\/li>\n<li>44.256.0.1 should be replaced by the IP address assigned to the gateway on your AMPRnet LAN<\/li>\n<li>192.0.2.1 should be replaced by your public static IP address<\/li>\n<\/ul>\n<p>Next you can run execute<\/p>\n<blockquote><p>sudo startampr &amp;<\/p><\/blockquote>\n<p><span style=\"color: #3366ff;\"><strong>TODO<\/strong><\/span>:<\/p>\n<ul>\n<li>setup iptables to limit access to the system<\/li>\n<li>setup AMPRnet gatway behind NAT (hoepfully there will be another solution for this soon)<\/li>\n<li>detect external public IP address automatically<\/li>\n<\/ul>\n<p><span style=\"color: #339966;\"><strong>UPDATES<\/strong><\/span>:<\/p>\n<ul>\n<li>make startampr script executable<\/li>\n<li>show how to launch startampr<\/li>\n<li>explain the IP address 169.228.66.251<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I had to setup many AMPRnet gateways on Linux machines and I always had a hard time remembering the different steps, so I try to provide a quick start over here. I have been using the RIP44d deamon for all &hellip; <a href=\"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,52],"tags":[58,59,9],"class_list":["post-761","post","type-post","status-publish","format-standard","hentry","category-hobbies","category-interests","tag-amprnet","tag-ham-radio","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"I had to setup many AMPRnet gateways on Linux machines and I always had a hard time remembering the different steps, so I try to provide a quick start over here. I have been using the RIP44d deamon for all &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Marc&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-05T13:12:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-12-14T09:47:26+00:00\" \/>\n<meta name=\"author\" content=\"Marc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marc\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/\"},\"author\":{\"name\":\"Marc\",\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#\\\/schema\\\/person\\\/f27bff846342220e94f4112cf42ca433\"},\"headline\":\"HowTo setup an AMPRnet Gateway on Linux\",\"datePublished\":\"2013-08-05T13:12:21+00:00\",\"dateModified\":\"2013-12-14T09:47:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/\"},\"wordCount\":684,\"commentCount\":23,\"publisher\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#\\\/schema\\\/person\\\/f27bff846342220e94f4112cf42ca433\"},\"keywords\":[\"AMPRnet\",\"HAM Radio\",\"Linux\"],\"articleSection\":[\"Hobbies\",\"Interests\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/\",\"url\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/\",\"name\":\"HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#website\"},\"datePublished\":\"2013-08-05T13:12:21+00:00\",\"dateModified\":\"2013-12-14T09:47:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/2013\\\/08\\\/howto-setup-an-amprnet-gateway-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HowTo setup an AMPRnet Gateway on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/\",\"name\":\"Marc&#039;s Blog\",\"description\":\"Things from me about me ...\",\"publisher\":{\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#\\\/schema\\\/person\\\/f27bff846342220e94f4112cf42ca433\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/#\\\/schema\\\/person\\\/f27bff846342220e94f4112cf42ca433\",\"name\":\"Marc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g\",\"caption\":\"Marc\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g\"},\"url\":\"https:\\\/\\\/marc.storck.lu\\\/blog\\\/author\\\/mcs23\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog","og_description":"I had to setup many AMPRnet gateways on Linux machines and I always had a hard time remembering the different steps, so I try to provide a quick start over here. I have been using the RIP44d deamon for all &hellip; Continue reading &rarr;","og_url":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/","og_site_name":"Marc&#039;s Blog","article_published_time":"2013-08-05T13:12:21+00:00","article_modified_time":"2013-12-14T09:47:26+00:00","author":"Marc","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Marc","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/#article","isPartOf":{"@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/"},"author":{"name":"Marc","@id":"https:\/\/marc.storck.lu\/blog\/#\/schema\/person\/f27bff846342220e94f4112cf42ca433"},"headline":"HowTo setup an AMPRnet Gateway on Linux","datePublished":"2013-08-05T13:12:21+00:00","dateModified":"2013-12-14T09:47:26+00:00","mainEntityOfPage":{"@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/"},"wordCount":684,"commentCount":23,"publisher":{"@id":"https:\/\/marc.storck.lu\/blog\/#\/schema\/person\/f27bff846342220e94f4112cf42ca433"},"keywords":["AMPRnet","HAM Radio","Linux"],"articleSection":["Hobbies","Interests"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/","url":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/","name":"HowTo setup an AMPRnet Gateway on Linux - Marc&#039;s Blog","isPartOf":{"@id":"https:\/\/marc.storck.lu\/blog\/#website"},"datePublished":"2013-08-05T13:12:21+00:00","dateModified":"2013-12-14T09:47:26+00:00","breadcrumb":{"@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/marc.storck.lu\/blog\/2013\/08\/howto-setup-an-amprnet-gateway-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/marc.storck.lu\/blog\/"},{"@type":"ListItem","position":2,"name":"HowTo setup an AMPRnet Gateway on Linux"}]},{"@type":"WebSite","@id":"https:\/\/marc.storck.lu\/blog\/#website","url":"https:\/\/marc.storck.lu\/blog\/","name":"Marc&#039;s Blog","description":"Things from me about me ...","publisher":{"@id":"https:\/\/marc.storck.lu\/blog\/#\/schema\/person\/f27bff846342220e94f4112cf42ca433"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/marc.storck.lu\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/marc.storck.lu\/blog\/#\/schema\/person\/f27bff846342220e94f4112cf42ca433","name":"Marc","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g","caption":"Marc"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/5bd58717bd32e93b66cdbe59441798a1d9cbf4003a7ad5333e5919016683201d?s=96&d=mm&r=g"},"url":"https:\/\/marc.storck.lu\/blog\/author\/mcs23\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pqZFU-ch","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/posts\/761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":11,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"predecessor-version":[{"id":800,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/posts\/761\/revisions\/800"}],"wp:attachment":[{"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marc.storck.lu\/blog\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}