Permalink
Browse files

Enable OLinuXino usb0 network by default.

  • Loading branch information...
bizarrefish committed May 22, 2016
1 parent 9c05385 commit 2edc0f2b63951021cbaac93b33cf4c0c4992fb2b
@@ -369,6 +369,8 @@ fi
prefix="${build.output.name}/install" />
<zipfileset file="src/main/resources/common/dhcpd-wlan0.conf"
prefix="${build.output.name}/install" />
<zipfileset file="src/main/resources/common/dhcpd-usb0.conf"
prefix="${build.output.name}/install" />
<!-- <intel-edison> -->
<zipfileset file="src/main/resources/${build.name}/udhcpd-for-hostapd.service"
prefix="${build.output.name}/install" />
@@ -0,0 +1,15 @@
# enabled? true
# prefix: 24
# pass DNS? true
subnet 172.16.2.0 netmask 255.255.255.0 {
option domain-name-servers 172.16.2.1;
interface usb0;
option routers 172.16.2.1;
default-lease-time 7200;
max-lease-time 7200;
pool {
range 172.16.2.100 172.16.2.110;
}
}
@@ -14,4 +14,9 @@ auto wlan0
iface wlan0 inet static
address 172.16.1.1
netmask 255.255.255.0
auto usb0
iface usb0 inet static
address 172.16.2.1
netmask 255.255.255.0
@@ -14,16 +14,21 @@ COMMIT
:OUTPUT ACCEPT [98:11816]
-A INPUT -i wlan0 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -i usb0 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -i wlan0 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i usb0 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i wlan0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i usb0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -p tcp -m tcp --dport 5002 -j ACCEPT
-A INPUT -i wlan0 -p tcp -m tcp --dport 1450 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 1450 -j ACCEPT
-A INPUT -i usb0 -p tcp -m tcp --dport 1450 -j ACCEPT
-A INPUT -s 10.234.0.0/16 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -i wlan0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -i usb0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
@@ -66,6 +66,9 @@ cp ${INSTALL_DIR}/kura/install/dhcpd-eth0.conf ${INSTALL_DIR}/kura/.data/dhcpd-e
cp ${INSTALL_DIR}/kura/install/dhcpd-wlan0.conf /etc/dhcpd-wlan0.conf
cp ${INSTALL_DIR}/kura/install/dhcpd-wlan0.conf ${INSTALL_DIR}/kura/.data/dhcpd-wlan0.conf
cp ${INSTALL_DIR}/kura/install/dhcpd-usb0.conf /etc/dhcpd-usb0.conf
cp ${INSTALL_DIR}/kura/install/dhcpd-usb0.conf ${INSTALL_DIR}/kura/.data/dhcpd-usb0.conf
#set up kuranet.conf
mkdir -p ${INSTALL_DIR}/kura/data
cp ${INSTALL_DIR}/kura/install/kuranet.conf ${INSTALL_DIR}/kura/data/kuranet.conf
@@ -1,4 +1,3 @@
#Tue Sep 10 17:49:05 GMT 2013
net.interface.eth0.config.ip4.status=netIPv4StatusEnabledWAN
net.interface.eth0.config.dhcpServer4.enabled=false
net.interface.eth0.config.nat.dst.interface=unknown
@@ -13,3 +12,9 @@ net.interface.wlan0.config.ip4.status=netIPv4StatusEnabledLAN
net.interface.wlan0.config.wifi.infra.driver=nl80211
net.interface.wlan0.config.nat.enabled=true
net.interface.wlan0.config.nat.dst.interface=unknown
net.interface.usb0.config.nat.masquerade=true
net.interface.usb0.config.dhcpServer4.passDns=true
net.interface.usb0.config.dhcpServer4.enabled=true
net.interface.usb0.config.ip4.status=netIPv4StatusEnabledLAN
net.interface.usb0.config.nat.enabled=true
net.interface.usb0.config.nat.dst.interface=unknown
@@ -32,6 +32,12 @@ case $response in
echo " done"
fi
echo Copying the $dflt_data_dir/dhcpd-usb0.conf file to the /etc directory ...
cp $dflt_data_dir/dhcpd-usb0.conf /etc
if [ "#?" = "0" ]; then
echo " done"
fi
echo Copying the $dflt_data_dir/hostapd-wlan0.conf file to the /etc directory ...
cp $dflt_data_dir/hostapd-wlan0.conf /etc
if [ "$?" = "0" ]; then

0 comments on commit 2edc0f2

Please sign in to comment.