Änderungen

Zur Navigation springen Zur Suche springen
103 Bytes hinzugefügt ,  20:45, 30. Sep. 2006
Zeile 147: Zeile 147:  
THIS="$(nvram get wifi_ipaddr|cut -d'.' -f3)"
 
THIS="$(nvram get wifi_ipaddr|cut -d'.' -f3)"
 
OLSR="/etc/local.olsrd.conf"; VTUN="/etc/vtund.conf"
 
OLSR="/etc/local.olsrd.conf"; VTUN="/etc/vtund.conf"
VPN="10.63.254"; SRV="214"; CNT="-1"
+
VPN="10.63.254"; SRV="214"; CNT="-1"; SRVPUBLIC="141.54.160.25"
 
# Liste aller teilnehmenden Clients (Netzknotennummern)
 
# Liste aller teilnehmenden Clients (Netzknotennummern)
 
LST="41 82 42 37 62 54 135 87 1"
 
LST="41 82 42 37 62 54 135 87 1"
Zeile 164: Zeile 164:  
   echo >>$VTUN " up { program \"ip addr add $VPN.$THIS peer $VPN.$CLIENT dev %%; ip link set %% mtu 1450 up\"; }; }"
 
   echo >>$VTUN " up { program \"ip addr add $VPN.$THIS peer $VPN.$CLIENT dev %%; ip link set %% mtu 1450 up\"; }; }"
 
   echo >>$OLSR -e "Interface \"tun$CNT\"$(write_olsr)\nIp4Broadcast $VPN.$CLIENT\n}"
 
   echo >>$OLSR -e "Interface \"tun$CNT\"$(write_olsr)\nIp4Broadcast $VPN.$CLIENT\n}"
 +
  # gleich noch ein NAT, damit man ohne Probleme auf beide Tunnelseiten kommt.
 
   iptables -I POSTROUTING -t nat -o tun$CNT -j MASQUERADE
 
   iptables -I POSTROUTING -t nat -o tun$CNT -j MASQUERADE
 
  done
 
  done
Zeile 174: Zeile 175:  
  echo >>$OLSR -e "Interface \"tun0\"$(write_olsr)\nIp4Broadcast $VPN.$SRV\nLinkQualityMult $VPN.$SRV 0.1\n}"
 
  echo >>$OLSR -e "Interface \"tun0\"$(write_olsr)\nIp4Broadcast $VPN.$SRV\nLinkQualityMult $VPN.$SRV 0.1\n}"
 
  # und starten
 
  # und starten
  vtund $(get_name $THIS) 141.54.160.25
+
  vtund $(get_name $THIS) $SRVPUBLIC
 
fi
 
fi
 
</pre>
 
</pre>

Navigationsmenü