Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Last active October 10, 2015 20:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruzickap/752d725232129eb60d0d to your computer and use it in GitHub Desktop.
Save ruzickap/752d725232129eb60d0d to your computer and use it in GitHub Desktop.
OpenWrt - Nodogsplash configuration
#Download the nodosplash compiled for Turris router (mpc85xx) [if it's not already in the "main repository"]
curl -L --insecure "https://github.com/ruzickap/linux.xvx.cz/raw/gh-pages/files/turris_configured/root/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk" -O /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk
#Install the package (try first: opkg install nodogsplash)
opkg install /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk
#Backup the original config file
mv /etc/nodogsplash/nodogsplash.conf /etc/nodogsplash/nodogsplash.conf-orig
#Create main config file
cat > /etc/nodogsplash/nodogsplash.conf << EOF
GatewayInterface br-wifi_open
FirewallRuleSet authenticated-users {
FirewallRule block to 192.168.0.0/16
FirewallRule block to 10.0.0.0/8
FirewallRule allow tcp port 53
FirewallRule allow udp port 53
FirewallRule allow tcp port 80
FirewallRule allow tcp port 443
FirewallRule allow tcp port 22
FirewallRule allow icmp
}
FirewallRuleSet preauthenticated-users {
FirewallRule allow tcp port 53
FirewallRule allow udp port 53
}
FirewallRuleSet users-to-router {
FirewallRule allow udp port 53
FirewallRule allow tcp port 53
FirewallRule allow udp port 67
FirewallRule allow icmp
}
GatewayName medlanky.xvx.cz
RedirectURL http://medlanky-hotspot.xvx.cz/
ClientForceTimeout 120
EOF
#Enable syslog logging
sed -i 's@^OPTIONS=.*@OPTIONS="-s -d 5"@' /etc/init.d/nodogsplash
#Modify the main page
wget "http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Brno-Medl%C3%A1nky_znak.svg/90px-Brno-Medl%C3%A1nky_znak.svg.png" -O /etc/nodogsplash/htdocs/images/90px-Brno-Medlanky_znak.svg.png
cp /etc/nodogsplash/htdocs/splash.html /etc/nodogsplash/htdocs/splash.html-orig
sed -i 's@splash.jpg@90px-Brno-Medlanky_znak.svg.png@;/align="center" height="120">/a\
\ \ \ \ \ \ \ \ <h2>For Internet access - click the sign.</h2> <h2>Pro pristup na Internet klikni na znak.</h2>' /etc/nodogsplash/htdocs/splash.html
#Enable nodogsplash to start at boot as a last service (because of slow guest wifi initialization)
sed -i 's/=65/=99/' /etc/init.d/nodogsplash
/etc/init.d/nodogsplash enable
@landsman
Copy link

Ahoj,
řešíme problém po provedení instalace balíku:

root@turris:# curl -L --insecure "https://github.com/ruzickap/linux.xvx.cz/raw/gh-pages/files/turris_configured/root/nodo
gsplash_0.9_beta9.9.8-2_mpc85xx.ipk" -O /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 199 100 199 0 0 349 0 --:--:-- --:--:-- --:--:-- 367
100 53171 100 53171 0 0 66008 0 --:--:-- --:--:-- --:--:-- 390k
curl: (3) malformed
root@turris:
# opkg install /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk
Collected errors:

  • wfopen: /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk: No such file or directory.
  • pkg_init_from_file: Failed to extract control file from /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk.

když se podívám do té složky, tak tam opravdu nic staženého není:

root@turris:~# cd /tmp/
root@turris:/tmp# ls
TZ hosts opkg-lists syslog-ng.ctl
addresses-ucollect-fake.md5 lib p9100d syslog-ng.persist
beaker libatsha204.lock resolv.conf syslog-ng.pid
crl.pem lock resolv.conf.auto ucollect
dhcp.leases log resolv.conf.auto.last.md5 ucollect-status
dnsmasq.d logrotate-nikola.state route.md5 ucollect_bandwidth_dump
empty logrotate.state rrd update-state
etc logs.last.sha1 rrdimg updater-lists
extroot luci-indexcache rule-description.txt user_notify
fastcgi.python.socket-0 luci-modulecache run usr
firewall-turris-status.txt luci-sessions spool
foris_backups nethist state
fw-rules nethist.stats sysinfo


Poradil by jsi?

díky Michal

edit: Dále pak vidím errory:


ERROR: cannot verify upload.wikimedia.org's certificate, issued by '/C=BE/O=GlobalSign nv-sa/CN= GlobalSign Organization Validation CA - SHA256 - G2':
Unable to locally verify the issuer's authority.
To connect to upload.wikimedia.org insecurely, use `--no-check-certificate'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment