User Tools

Site Tools


wibed:upc_gws_config

Wibed UPC GWs configuration

GW configuration

upc-set-gw.sh

#!/bin/sh
echo "Configuring Wibed gateway"

uci batch << EOF
set network.loopback.dns="8.8.8.8"
set network.upc="route"
set network.upc.target="147.83.0.0"
set network.upc.netmask="255.255.0.0"
set network.upc.gateway="10.8.10.9"
set network.upc.interface="wan"
set network.wan="interface"
set network.wan.ifname="eth0.2"
set network.wan.proto="static"
set network.wan.ipaddr="10.8.10.10"
set network.wan.netmask="255.255.255.248"
set wibed.management.is_gw="1"
commit
EOF

echo "sh /root/upc-set-gre.sh" >> /etc/rc.local
sed -i s/"exit 0"//g /etc/rc.local

upc-set-gre.sh:

#!/bin/sh
ip tunnel add a1 mode gre local 10.8.10.10 remote 147.83.30.197
ip addr add 192.168.100.2/24 dev a1
ip link set a1 up
ip route add default via 192.168.100.1
iptables -A POSTROUTING -t nat -o a1 -j MASQUERADE

The scripts for both the active gateways can be downloaded here: gw_scripts.tar.gz

Server Configuration

#GW-A5-F(-1)
ip tunnel add a1 mode gre remote 10.8.10.10 local 147.83.30.197
ip addr add 192.168.100.1/24 dev a1
ip link set a1 up


iptables -A POSTROUTING -t nat -s 192.168.100.0/24 -j SNAT --to 147.83.30.197
wibed/upc_gws_config.txt · Last modified: 2015/06/07 23:59 by savemanos