[vigir] adjust scripts for two radios
This commit is contained in:
parent
2ca5d01d57
commit
b0be0cc7eb
2 changed files with 11 additions and 21 deletions
|
@ -34,7 +34,7 @@ fi
|
||||||
public_key=$(echo $private_key | wg pubkey)
|
public_key=$(echo $private_key | wg pubkey)
|
||||||
|
|
||||||
vpn_endpoint_host=vpn-2a0ae5c1500.ungleich.ch
|
vpn_endpoint_host=vpn-2a0ae5c1500.ungleich.ch
|
||||||
vpn_endpoint_pubkey=ygZQW3OSiMJl/RpKyaJVE0GSt6bjEDnoxdMJsNiloRE=
|
vpn_endpoint_pubkey=oaFiIVV1NjvDcfdtwJqR4F3k2XIC07npNgj0YjIEem4=
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
found=""
|
found=""
|
||||||
|
@ -55,11 +55,8 @@ fi
|
||||||
|
|
||||||
cat <<EOF | ssh -t "root@${vigir_ip}"
|
cat <<EOF | ssh -t "root@${vigir_ip}"
|
||||||
set -x
|
set -x
|
||||||
# Setup lan to also retrieve an ip address via dhcp
|
|
||||||
|
|
||||||
# Adjust LAN to be IPv6 only
|
# Set IPv6 address on LAN
|
||||||
uci delete network.lan.ipaddr
|
|
||||||
uci delete network.lan.netmask
|
|
||||||
uci set network.lan.ip6addr='${my_lan_ip}/64'
|
uci set network.lan.ip6addr='${my_lan_ip}/64'
|
||||||
|
|
||||||
# Do not announce ULA - we have GUA
|
# Do not announce ULA - we have GUA
|
||||||
|
@ -67,13 +64,6 @@ uci delete network.globals.ula_prefix
|
||||||
|
|
||||||
# Setup Router Advertisements / remove IPv4 dhcp
|
# Setup Router Advertisements / remove IPv4 dhcp
|
||||||
uci set dhcp.lan.ra='server'
|
uci set dhcp.lan.ra='server'
|
||||||
uci set dhcp.lan.dynamicdhcp='0'
|
|
||||||
|
|
||||||
uci delete dhcp.@dnsmasq[0].authoritative
|
|
||||||
|
|
||||||
uci delete dhcp.lan.start
|
|
||||||
uci delete dhcp.lan.limit
|
|
||||||
uci delete dhcp.lan.leasetime
|
|
||||||
|
|
||||||
# We do stateless by default everywhere
|
# We do stateless by default everywhere
|
||||||
uci delete dhcp.lan.dhcpv6
|
uci delete dhcp.lan.dhcpv6
|
||||||
|
@ -87,26 +77,27 @@ uci set dhcp.@dnsmasq[0].noresolv='1'
|
||||||
uci set dhcp.@dnsmasq[0].localuse='0'
|
uci set dhcp.@dnsmasq[0].localuse='0'
|
||||||
|
|
||||||
# DNS upstream over VPN gives DNS64
|
# DNS upstream over VPN gives DNS64
|
||||||
uci delete dhcp.@dnsmasq[0].server
|
|
||||||
uci add_list dhcp.@dnsmasq[0].server='2a0a:e5c0:0:a::a'
|
uci add_list dhcp.@dnsmasq[0].server='2a0a:e5c0:0:a::a'
|
||||||
uci add_list dhcp.@dnsmasq[0].server='2a0a:e5c0:2:a::a'
|
uci add_list dhcp.@dnsmasq[0].server='2a0a:e5c0:2:a::a'
|
||||||
|
|
||||||
uci set system.@system[0].hostname="${vigir_hostname}"
|
uci set system.@system[0].hostname="${vigir_hostname}"
|
||||||
|
|
||||||
# wifi ip address
|
|
||||||
# uci set network.wifi=interface
|
|
||||||
# uci set network.wifi.proto='static'
|
|
||||||
# uci set network.wifi.ip6addr='${my_wifi_ip}/64'
|
|
||||||
|
|
||||||
# Wifi configuration
|
# Wifi configuration
|
||||||
uci set wireless.radio0=wifi-device
|
uci set wireless.radio0=wifi-device
|
||||||
uci set wireless.radio0.htmode='HT40'
|
uci set wireless.radio0.htmode='HT40'
|
||||||
uci set wireless.radio0.country='CH'
|
uci set wireless.radio0.country='CH'
|
||||||
uci set wireless.radio0.channel='6'
|
uci set wireless.radio0.channel='6'
|
||||||
|
|
||||||
uci set wireless.default_radio0.encryption='psk2'
|
uci set wireless.default_radio0.encryption='psk2'
|
||||||
uci set wireless.default_radio0.key='iloveipv6'
|
uci set wireless.default_radio0.key='iloveipv6'
|
||||||
uci set wireless.default_radio0.ssid='IPv6 everywhere ${vigir_hostname}'
|
uci set wireless.default_radio0.ssid='IPv6 everywhere ${vigir_hostname}'
|
||||||
|
|
||||||
|
uci set wireless.radio1.country='CH'
|
||||||
|
uci set wireless.default_radio1.encryption='psk2'
|
||||||
|
uci set wireless.default_radio1.key='iloveipv6'
|
||||||
|
uci set wireless.default_radio1.ssid='IPv6 everywhere ${vigir_hostname} 5Ghz'
|
||||||
|
|
||||||
|
|
||||||
# Ensure it is not disabled
|
# Ensure it is not disabled
|
||||||
uci delete wireless.radio0.disabled
|
uci delete wireless.radio0.disabled
|
||||||
|
|
||||||
|
@ -119,9 +110,6 @@ uci delete wireless.radio0.disabled
|
||||||
|
|
||||||
uci commit
|
uci commit
|
||||||
|
|
||||||
# ensure no overlapping networks are there
|
|
||||||
#ip addr del 192.168.1.1/24 dev br-lan
|
|
||||||
|
|
||||||
ping -c5 ungleich.ch || exit 1
|
ping -c5 ungleich.ch || exit 1
|
||||||
|
|
||||||
# update the sources
|
# update the sources
|
||||||
|
|
|
@ -28,6 +28,8 @@ cat <<EOF | ssh -t "root@${vigir_ip}"
|
||||||
|
|
||||||
# Correct test SSID to final one
|
# Correct test SSID to final one
|
||||||
uci set wireless.default_radio0.ssid='IPv6 everywhere'
|
uci set wireless.default_radio0.ssid='IPv6 everywhere'
|
||||||
|
uci set wireless.default_radio1.ssid='IPv6 everywhere 5Ghz'
|
||||||
|
|
||||||
uci commit
|
uci commit
|
||||||
|
|
||||||
# Remove our ssh keys
|
# Remove our ssh keys
|
||||||
|
|
Loading…
Reference in a new issue