ip45bgw – OpenWrt

Installing ip45bgw through OpenWrt web interface:
  • Log into OpenWrt web interface and in the menu  elect “System (2) -> Software (3) -> Configuration (4)” tab i1
  • In the box add the line with the ip45 package repository (5). The line should look like:
     src/gz ip45 http://ip45.org/packages/openwrt/attitude_adjustment/12.09/ar71xx/generic/packages
    The part of the path underlined with red color have to be replaced with path that is suitable for your OpenWrt installation. You can just simply simply copy this part of the path from the line below.
  • Submit changes (6),i2
  • Go to “Actions” tab (7) andpress “Update lists” (8) Wait until data are downloaded from repositories. If the button is missing you probably performed the update in less than 24 hours. In that case the button appears after reboot of the router.
  • Go to filter section and fill “ip45” into bog (9),  press “Find Package” button (10)
  • Go to “Available Package” tab (11). If everything went ok the ip45bgw package should appear in the list of available packages. By clicking on the “Install” (12) the ip45bgw package will be installed into your router.
  • Reboot the router. After the router boots up the module ipt_ip45bgw should be into memory. It can be checked on the command line by executing lsmod | grep ip45
Installing through command line:
  • Log into your OpenWrt router via ssh or telnet.
  • Execute
    # opkg install http://ip45.org/packages/openwrt/attitude_adjustment/12.09/adm5120/rb1xx/packages/ip45bgw_0.151-1_adm5120_mipsel.ipk where the part of the path attitude_adjustment/12.09/adm5120/rb1xx and package name ip45bgw_0.151-1_adm5120_mipsel.ipk must be replaced with the proper values suitable for your installation.
  • Reboot the router.
Adding ip45bgw rules into firewall:
    • Go to “Network (13) -> Firewall (14) -> Custom Rules (15)” tabi3
    • In the box add following rules:
      iptables -t nat -I POSTROUTING -p udp --dport 4 -j ACCEPT
      iptables -t nat -I POSTROUTING -p udp --sport 4 -j ACCEPT
      
      iptables -I FORWARD -p udp --dport 4 -j ACCEPT
      iptables -I FORWARD -p udp --sport 4 -j ACCEPT
      
      iptables -t mangle -I POSTROUTING -o eth1 -j ip45bgw --upstream-addr=78.102.65.145 --downstream-prefix=192.168.1.0/24
      iptables -t mangle -I PREROUTING -i eth1 -j ip45bgw --upstream-addr=78.102.65.145 --downstream-prefix=192.168.1.0/24
 
  • Press “Submit” button and reboot the router.