#create bridge
sudo brctl addbr br0
sudo ifconfig br0 up
#add ethernet nic to the bridge
sudo brctl addif br0 enp0s10
sudo ifconfig enp0s10 up
#bring wifi interface up
sudo ifconfig wlp3s0 up
#connect to the AP to repeat with wpa_supplicant
sudo bash -c 'wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase SSID pass)'
#get the ip from the DHCP server
sudo dhclient wlp3s0
#sleep 10
#enable proxy arping and ip forwarding
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp'
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
#disable ipv6
sudo bash -c 'sysctl -w net.ipv6.conf.all.disable_ipv6=1'
sudo bash -c 'sysctl -w net.ipv6.conf.default.disable_ipv6=1'
#parprouted inner net, outer net(AP,Client)
sudo parprouted br0 wlp3s0
#clone the dhcp-allocated IP to br0 so that the dhcp-helper will relay for the correct subnet
sudo ip addr add $(/sbin/ip addr show wlp3s0 | perl -wne 'm|^\s+inet (.*)/| && print $1')/32 dev br0
#start dhcp-helper, Client
sudo dhcp-helper -b wlp3s0 -s 192.168.8.110
#start hostapd
sudo bash -c 'hostapd /home/macdeb/scripts/clientRepeater/88x2bu_5GHostapdConfig.conf'
#get bridge ip from the DHCP server
#sudo dhclient br0