Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества? Помогите нам с документацией!
0 Пользователей и 1 Гость просматривают эту тему.
man iwconfig
#!/bin/bashPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin/etc/init.d/dnsmasq stop ifconfig wlan0 down iwconfig wlan0 mode ad-hoc iwconfig wlan0 channel 8 iwconfig wlan0 txpower 20 iwconfig wlan0 essid WI-FI #iwconfig wlan0 enc on #iwconfig wlan0 key 1234567890 ifconfig wlan0 10.0.0.1/24 up #ifconfig wlan0 172.16.0.1/12 up/etc/init.d/dnsmasq start# Enable routing. echo 1 > /proc/sys/net/ipv4/ip_forward #!!! #echo 2 > /proc/sys/net/ipv4/conf/default/force_igmp_version# For fixing problem iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu# Разрешаем ходить пакетам между интерфесом MASQUERADE iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE# Allow established connections, and those not coming from the outside iptables -A FORWARD -i ppp0 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -i eth0 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT# Allow outgoing connections from the LAN side. iptables -A FORWARD -i wlan0 -o ppp0 -j ACCEPT iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT# Также откроем все соединения с нашей подсетью iptables -A INPUT -p ALL -i wlan0 -j ACCEPT iptables -A OUTPUT -p ALL -o wlan0 -j ACCEPT# Don't forward from the outside to the inside. #iptables -A FORWARD -i ppp0 -o eth0 -j REJECT #iptables -A FORWARD -i eth0 -o ppp0 -j REJECT# IGMP# iptables -A INPUT -p igmp -j ACCEPT# iptables -A OUTPUT -p igmp -j ACCEPT # iptables -A FORWARD -p igmp -j ACCEPT #iptables -t filter -A INPUT -d 224.0.0.0/4 -i eth0 -j ACCEPT #iptables -t filter -A INPUT -s 224.0.0.0/4 -i eth0 -j ACCEPT #iptables -t filter -A FORWARD -d 224.0.0.0/4 -j ACCEPT #iptables -t filter -A FORWARD -s 224.0.0.0/4 -j ACCEPT #iptables -A FORWARD -d 224.0.0.0/4 -j ACCEPT #iptables -A FORWARD -s 224.0.0.0/4 -j ACCEPT #iptables -A FORWARD -p igmp -i eth0 -o wlan0 -j ACCEPT #iptables -A FORWARD -p igmp -i ppp0 -o wlan0 -j ACCEPT #iptables -A FORWARD -p igmp -i eth0 -o eth1 -j ACCEPT #iptables -A FORWARD -p igmp -i ppp0 -o eth1 -j ACCEPT #iptables -A INPUT -d 224.0.0.0/4 -j ACCEPT #sudo watch -n 60 'iwconfig wlan0&iwlist wlan0 scan | grep -f iwgr.txt'exit 0
Страница сгенерирована за 0.086 секунд. Запросов: 21.