/etc/init.d/dnsmasq
disable /etc/init.d/dnsmasq stop |
/etc/init.d/firewall
disable /etc/init.d/firewall stop |
/etc/init.d/odhcpd disable /etc/init.d/odhcpd stop |
nano /etc/config/network |
Bei Attitude Adjustment heißt der Switch "eth0" und dort es sähe dann so aus (wenn gelöscht wird, statt auszukommentieren):
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
#config globals 'globals'
# option ula_prefix 'fde9:6866:786a::/48'
config interface 'lan'
option ifname 'eth0.1'
# option force_link '1'
option type 'bridge'
option proto 'dhcp'
# option proto 'static'
# option ipaddr '192.168.1.1'
# option netmask '255.255.255.0'
# option ip6assign '60'
#config interface 'wan'
# option ifname 'eth0.2'
# option proto 'dhcp'
#config interface 'wan6'
# option ifname '@wan'
# option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 1 2 3 4 5'
#config switch_vlan
# option device 'switch0'
# option vlan '2'
# option ports '0t 1'
Und auf einem TP-Link TL-WR1043ND mit Attitude Adjustment sieht /etc/config/network folgendermaßen aus:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'dhcp'
config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 1 2 3 4 5'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'dhcp'
config switch
option name 'rtl8366rb'
option reset '1'
option enable_vlan '1'
option enable_vlan4k '1'
config switch_vlan
option device 'rtl8366rb'
option vlan '1'
option ports '0 1 2 3 4 5t'
löschen oder auskommentieren. Dadurch werden dann im WebGUI keine Firewall-Regeln für die abgeschaltete Firewall angezeigt.
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward ACCEPT
reboot |
ggf. das "OpenWrt" ändern (z.B. auf FreifunkWees01a).
option commonname OpenWrt
opkg install
uhttpd-mod-tls opkg install luci-ssl reboot |
oder auch als:
# list listen_http 0.0.0.0:80
# list listen_http [::]:80
list listen_https 0.0.0.0:443
list listen_https [::]:443
# list listen_http '0.0.0.0:80'
# list listen_http '[::]:80'
list listen_https '0.0.0.0:443'
list listen_https '[::]:443'
/etc/init.d/uhttpd
stop /etc/init.d/uhttpd start |
netstat
-nlp |
Also sind ssh (22) und https (443) für IPv4 und IPv6 offen.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 804/dropbear
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 840/uhttpd
tcp 0 0 :::22 :::* LISTEN 804/dropbear
tcp 0 0 :::443 :::* LISTEN 840/uhttpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 302 457/ubusd /var/run/ubus.sock
Wenn ein hinreichend langes Passwort für das WebGUI eingestellt wurde, dürfte es ziemlich schwer werden, sich unberechtigt Zugang zu verschaffen.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 998/dropbear
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1012/uhttpd
netstat: /proc/net/tcp6: No such file or directory
netstat: /proc/net/udp6: No such file or directory
netstat: /proc/net/raw6: No such file or directory
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 707 595/ubusd /var/run/ubus.sock