Setting up a gateway on OpenWRT: Difference between revisions

From 44Net Wiki
Jump to navigation Jump to search
Kb3vwg (talk | contribs)
Created page with "ampr-ripd has been compiled for Atheros 71xx == Summary == Install: * kmod-ipip * ip-full * ampr-ripd to '''/etc/config/''' * a bridge interface to tunl0 and a new VLAN..."
 
Kb3vwg (talk | contribs)
Line 7: Line 7:
* kmod-ipip
* kmod-ipip
* ip-full
* ip-full
* ampr-ripd to '''/etc/config/'''
* [[ampr-ripd]] to '''/etc/config/''' (always run [[RIP]]44 software in console mode FIRST after installation to verify execution and obtain the password, the execution of the file is commented-out below)
* a bridge interface to tunl0 and a new VLAN, adding it to it's own firewall zone
* a bridge interface to tunl0 and a new VLAN, adding it to it's own firewall zone
* a VLAN to any switch/trunk ports (as desired)
* a VLAN to any switch/trunk ports (as desired)
Line 16: Line 16:
  ifconfig tunl0 mtu 1480 up
  ifconfig tunl0 mtu 1480 up
  iptables -t filter -I INPUT -p 4 -i eth0.2 -j ACCEPT
  iptables -t filter -I INPUT -p 4 -i eth0.2 -j ACCEPT
  ./etc/config/ampr-ripd -p '''<PASSWORD>''' -t 44 -a 44.60.44.0/24
  '''# ./etc/config/ampr-ripd -p '''<PASSWORD>''' -t 44 -a 44.60.44.0/24'''
  ip route add default dev tunl0 via '''<AMPRGW>''' onlink table 44
  ip route add default dev tunl0 via '''<AMPRGW>''' onlink table 44
  ip route add '''<44.xxx.xxx.xxx/xx>''' src '''<44.xxx.xxx.xxx>''' dev '''<br-amprnet>''' table 44
  ip route add '''<44.xxx.xxx.xxx/xx>''' src '''<44.xxx.xxx.xxx>''' dev '''<br-amprnet>''' table 44

Revision as of 03:05, 15 August 2015

ampr-ripd has been compiled for Atheros 71xx

Summary

Install:

  • kmod-ipip
  • ip-full
  • ampr-ripd to /etc/config/ (always run RIP44 software in console mode FIRST after installation to verify execution and obtain the password, the execution of the file is commented-out below)
  • a bridge interface to tunl0 and a new VLAN, adding it to it's own firewall zone
  • a VLAN to any switch/trunk ports (as desired)


(eth0.2 in this case is the Public-facing WAN (to allow IPENCAP traffic), read your OpenWRT hardware Wiki for your specific model

ifconfig tunl0 mtu 1480 up
iptables -t filter -I INPUT -p 4 -i eth0.2 -j ACCEPT
# ./etc/config/ampr-ripd -p <PASSWORD> -t 44 -a 44.60.44.0/24
ip route add default dev tunl0 via <AMPRGW> onlink table 44
ip route add <44.xxx.xxx.xxx/xx> src <44.xxx.xxx.xxx> dev <br-amprnet> table 44
###OPTIONAL FOR LAN###
ip route add 192.168.0.0/16 src 192.168.x.x dev br-lan table 44
###
ip rule add to 44.0.0.0/8 table 44 priority 44
ip rule add from 44.0.0.0/8 table 44 priority 45
  • create any forwarding rules