소스 검색

Allow hotspot ping

Bob Mottram 10 년 전
부모
커밋
9bd26bf719
1개의 변경된 파일13개의 추가작업 그리고 5개의 파일을 삭제
  1. 13
    5
      install-freedombone.sh

+ 13
- 5
install-freedombone.sh 파일 보기

@@ -328,17 +328,17 @@ WIFI_HOTSPOT_CHANNEL=7
328 328
 WIFI_HOTSPOT_MODE="g"
329 329
 
330 330
 # Static IP address for wifi hotspot
331
-WIFI_STATIC_IP_ADDRESS="192.168.1.53"
331
+WIFI_STATIC_IP_ADDRESS="192.168.4.1"
332 332
 
333 333
 # Subnet for wifi hotspot
334
-WIFI_SUBNET="192.168.1.0"
334
+WIFI_SUBNET="192.168.4.0"
335 335
 
336 336
 # DHCP range for wifi hotspot
337
-WIFI_IP_RANGE_START="192.168.1.10"
338
-WIFI_IP_RANGE_END="192.168.1.20"
337
+WIFI_IP_RANGE_START="192.168.4.10"
338
+WIFI_IP_RANGE_END="192.168.4.20"
339 339
 
340 340
 # Broadcast address for wifi hotspot
341
-WIFI_BROADCAST_ADDRESS="192.168.1.255"
341
+WIFI_BROADCAST_ADDRESS="192.168.4.255"
342 342
 
343 343
 # Comma separated list of DNS servers for wifi hotspot
344 344
 WIFI_DNS_SERVERS="213.73.91.35, 85.214.20.141"
@@ -7228,6 +7228,14 @@ function enable_wifi_hotspot {
7228 7228
   sed -i 's/net.ipv4.ip_forward=.*/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
7229 7229
   echo 1 > /proc/sys/net/ipv4/ip_forward
7230 7230
 
7231
+  sed -i "s/net.ipv4.conf.all.accept_redirects = 0/net.ipv4.conf.all.accept_redirects = 1/g" /etc/sysctl.conf
7232
+  sed -i "s/net.ipv4.conf.all.send_redirects = 0/net.ipv4.conf.all.send_redirects = 1/g" /etc/sysctl.conf
7233
+  sed -i "s/net.ipv4.conf.all.accept_source_route = 0/net.ipv4.conf.all.accept_source_route = 1/g" /etc/sysctl.conf
7234
+  sed -i "s/net.ipv4.conf.default.rp_filter=1/#net.ipv4.conf.default.rp_filter=1/g" /etc/sysctl.conf
7235
+  sed -i "s/net.ipv4.conf.all.rp_filter=1/#net.ipv4.conf.all.rp_filter=1/g" /etc/sysctl.conf
7236
+  sed -i "s/net.ipv4.ip_forward=0/#net.ipv4.ip_forward=1/g" /etc/sysctl.conf
7237
+  sed -i 's/net.ipv4.icmp_echo_ignore_all = 1/net.ipv4.icmp_echo_ignore_all = 0/g' /etc/sysctl.conf
7238
+
7231 7239
   iptables --flush
7232 7240
   iptables --table nat --flush
7233 7241
   iptables --delete-chain