Should i be worried?

This morning just before apparently 8:30 my R7800 (on 21.02) restarted. It was functioning fine for at least a few weeks. What caused the restart? I don't know. The router logs to my NAS but nothing strange is logged.

What worries me is that as soon as the router restarted i saw this sequence of events in its eventlog:

Thu Oct 14 08:26:58 2021 daemon.notice netifd: Network device 'wlan1' link is up
Thu Oct 14 08:26:59 2021 authpriv.info dropbear[3122]: Child connection from 41.47.233.161:36603
Thu Oct 14 08:26:59 2021 authpriv.info dropbear[3122]: Exit before auth from <41.47.233.161:36603>: Exited normally
Thu Oct 14 08:26:59 2021 authpriv.info dropbear[3124]: Child connection from 41.47.233.161:36648
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: Connected to system UBus
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: started, version 2.85 cachesize 150
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: DNS service limited to local subnets
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: UBus support enabled: connected to system bus
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq-dhcp[3163]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain test
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain onion
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain localhost
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain local
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain invalid
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain bind
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using nameserver 127.0.0.1#5053
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using nameserver 127.0.0.1#5054
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: using only locally-known addresses for domain lan
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: read /etc/hosts - 4 addresses
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: read /tmp/hosts/odhcpd - 1 addresses
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq[3163]: read /tmp/hosts/dhcp.cfg01411c - 8 addresses
Thu Oct 14 08:27:00 2021 daemon.info dnsmasq-dhcp[3163]: read /etc/ethers - 0 addresses
Thu Oct 14 08:27:01 2021 authpriv.warn dropbear[3124]: Bad password attempt for 'root' from 41.47.233.161:36648
Thu Oct 14 08:27:02 2021 authpriv.info dropbear[3124]: Exit before auth from <41.47.233.161:36648>: (user 'root', 1 fails): Exited normally

The entries at time stamp 08:26:59 and 08:27:01 and 08:27:02 worry me. What happened here?
Tried some to log in to my router? As the title says "Should I be worried?". Is my router false configured? Is there a connection between the restart and these entries?

I looked up the ip address and it refers to an address in Cairo/Egypt.

Do you have ssh open to the WAN? Password or key based auth? Highly recommend disabling password based if you are open to the WAN. Also consider running a non-standard port and using a util like fail2ban or if possible 2-factor auth.

I'm not aware that SSH is open to WAN. This is how my SSH is configured.
Looking at the interface info; it appears to listens to all interfaces (including the WAN).
Is this bad configured? It is or should be stock 21.02.

image

This is bog standard SSH brute forcing like it happens to any internet connected host offering an SSH server. Apparently your SSH port is exposed to the WAN, otherwise you wouldn't see those entries. Normally access to port 22 from WAN is prevented by default firewall settings, you must have changed something that allows this access now.

But apart from that, Bad password attempt means that authentication didn't succeed and Exit before auth means that the brute forcing bot quit the connection without trying further.

This doesn't actually indicate if the router is listening to connections originating from the WAN.

The most useful info for us to see is your firewall file (/etc/config/firewall) -- please post that here for review.

I changed the SSH interface to only LAN. This should block access from WAN.

I'm not aware that I changed something to the firewall rules. It should be stock 21.02 plus a few Port forwards for the XBox.
What should I look for?

please connect to your router via ssh and provide the contents of the /etc/config/firewall file. The screenshots aren't sufficient for a proper review.

Also, changing the SSH interface to LAN doesn't actually prevent connections from the WAN (although there is nuance here that may result in the same effect, but it is not the preferred way to ensure that WAN connectivity is prohibited).

config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option src_ip		fc00::/6
	option dest_ip		fc00::/6
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
	option name		Support-UDP-Traceroute
	option src		wan
	option dest_port	33434:33689
	option proto		udp
	option family		ipv4
	option target		REJECT
	option enabled		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option proto 'tcp udp'
	option dest_ip '192.168.1.100'
	option name 'QBit'
	option src_dport '62496'
	option dest_port '62496'

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option proto 'tcp udp'
	option src_dport '42638'
	option dest_ip '192.168.1.10'
	option dest_port '42638'
	option name 'NAS'
	option enabled '0'

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option dest_ip '192.168.1.125'
	option name 'XBoxOne'
	option src_port '3544'
	option src_dport '50426'
	option dest_port '50426'
	option proto 'tcp udp'

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option dest_ip '192.168.1.126'
	option name 'XBox360'
	option proto 'tcp udp'
	option dest_port '3074'
	option src_dport '3074'

config redirect
	option src 'wan'
	option name 'XBoxX'
	option target 'DNAT'
	option dest 'lan'
	option dest_ip '192.168.1.132'
	option dest_port '50007'
	list proto 'tcp'
	list proto 'udp'
	option src_dport '50007'

This looks all fine, question is if you wan interface is actually your upstream interface. Can you please provide your /etc/config/network as well?

Here you go. I really appreciate the support of you guys.


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdaf:654c:6f84::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1.1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0.2'
	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 '1 2 3 4 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 0t'

Looks fine too. What's the output of ip route and iptables-save ?

/etc/config$ ip route
default via xx.yy.184.1 dev eth0.2  src xx.yy.184.135 
xx.yy.184.0/23 dev eth0.2 scope link  src xx.yy.184.135 
192.168.1.0/24 dev br-lan scope link  src 192.168.1.1 
/etc/config$ iptables-save
# Generated by iptables-save v1.8.7 on Thu Oct 14 20:40:44 2021
*nat
:PREROUTING ACCEPT [64547:9128786]
:INPUT ACCEPT [8230:635486]
:OUTPUT ACCEPT [8939:648965]
:POSTROUTING ACCEPT [24753:2072085]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
-A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
-A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_prerouting
-A PREROUTING -i eth0.2 -m comment --comment "!fw3" -j zone_wan_prerouting
-A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
-A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_postrouting
-A POSTROUTING -o eth0.2 -m comment --comment "!fw3" -j zone_wan_postrouting
-A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.100/32 -p tcp -m tcp --dport 62496 -m comment --comment "!fw3: QBit (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.100/32 -p udp -m udp --dport 62496 -m comment --comment "!fw3: QBit (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.125/32 -p tcp -m tcp --dport 50426 -m comment --comment "!fw3: XBoxOne (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.125/32 -p udp -m udp --dport 50426 -m comment --comment "!fw3: XBoxOne (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.126/32 -p tcp -m tcp --dport 3074 -m comment --comment "!fw3: XBox360 (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.126/32 -p udp -m udp --dport 3074 -m comment --comment "!fw3: XBox360 (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.132/32 -p tcp -m tcp --dport 50007 -m comment --comment "!fw3: XBoxX (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_postrouting -s 192.168.1.0/24 -d 192.168.1.132/32 -p udp -m udp --dport 50007 -m comment --comment "!fw3: XBoxX (reflection)" -j SNAT --to-source 192.168.1.1
-A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
-A zone_lan_prerouting -p tcp -m tcp --dport 53 -m comment --comment "!fw3: ubus:https-dns-proxy[instance1] redirect 0" -j REDIRECT --to-ports 53
-A zone_lan_prerouting -p udp -m udp --dport 53 -m comment --comment "!fw3: ubus:https-dns-proxy[instance1] redirect 0" -j REDIRECT --to-ports 53
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p tcp -m tcp --dport 62496 -m comment --comment "!fw3: QBit (reflection)" -j DNAT --to-destination 192.168.1.100:62496
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p udp -m udp --dport 62496 -m comment --comment "!fw3: QBit (reflection)" -j DNAT --to-destination 192.168.1.100:62496
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p tcp -m tcp --dport 50426 -m comment --comment "!fw3: XBoxOne (reflection)" -j DNAT --to-destination 192.168.1.125:50426
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p udp -m udp --dport 50426 -m comment --comment "!fw3: XBoxOne (reflection)" -j DNAT --to-destination 192.168.1.125:50426
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p tcp -m tcp --dport 3074 -m comment --comment "!fw3: XBox360 (reflection)" -j DNAT --to-destination 192.168.1.126:3074
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p udp -m udp --dport 3074 -m comment --comment "!fw3: XBox360 (reflection)" -j DNAT --to-destination 192.168.1.126:3074
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p tcp -m tcp --dport 50007 -m comment --comment "!fw3: XBoxX (reflection)" -j DNAT --to-destination 192.168.1.132:50007
-A zone_lan_prerouting -s 192.168.1.0/24 -d xx.yy.184.135/32 -p udp -m udp --dport 50007 -m comment --comment "!fw3: XBoxX (reflection)" -j DNAT --to-destination 192.168.1.132:50007
-A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting rule chain" -j postrouting_wan_rule
-A zone_wan_postrouting -m comment --comment "!fw3" -j MASQUERADE
-A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting rule chain" -j prerouting_wan_rule
-A zone_wan_prerouting -p tcp -m tcp --dport 62496 -m comment --comment "!fw3: QBit" -j DNAT --to-destination 192.168.1.100:62496
-A zone_wan_prerouting -p udp -m udp --dport 62496 -m comment --comment "!fw3: QBit" -j DNAT --to-destination 192.168.1.100:62496
-A zone_wan_prerouting -p tcp -m tcp --sport 3544 --dport 50426 -m comment --comment "!fw3: XBoxOne" -j DNAT --to-destination 192.168.1.125:50426
-A zone_wan_prerouting -p udp -m udp --sport 3544 --dport 50426 -m comment --comment "!fw3: XBoxOne" -j DNAT --to-destination 192.168.1.125:50426
-A zone_wan_prerouting -p tcp -m tcp --dport 3074 -m comment --comment "!fw3: XBox360" -j DNAT --to-destination 192.168.1.126:3074
-A zone_wan_prerouting -p udp -m udp --dport 3074 -m comment --comment "!fw3: XBox360" -j DNAT --to-destination 192.168.1.126:3074
-A zone_wan_prerouting -p tcp -m tcp --dport 50007 -m comment --comment "!fw3: XBoxX" -j DNAT --to-destination 192.168.1.132:50007
-A zone_wan_prerouting -p udp -m udp --dport 50007 -m comment --comment "!fw3: XBoxX" -j DNAT --to-destination 192.168.1.132:50007
COMMIT
# Completed on Thu Oct 14 20:40:44 2021
# Generated by iptables-save v1.8.7 on Thu Oct 14 20:40:44 2021
*mangle
:PREROUTING ACCEPT [38799927:76180207728]
:INPUT ACCEPT [82502:11156632]
:FORWARD ACCEPT [38700865:76165274424]
:OUTPUT ACCEPT [80152:10671952]
:POSTROUTING ACCEPT [38780400:76175919315]
-A FORWARD -o eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -i eth0.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Thu Oct 14 20:40:44 2021
# Generated by iptables-save v1.8.7 on Thu Oct 14 20:40:44 2021
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:forwarding_lan_rule - [0:0]
:forwarding_rule - [0:0]
:forwarding_wan_rule - [0:0]
:input_lan_rule - [0:0]
:input_rule - [0:0]
:input_wan_rule - [0:0]
:output_lan_rule - [0:0]
:output_rule - [0:0]
:output_wan_rule - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
:zone_lan_dest_ACCEPT - [0:0]
:zone_lan_forward - [0:0]
:zone_lan_input - [0:0]
:zone_lan_output - [0:0]
:zone_lan_src_ACCEPT - [0:0]
:zone_wan_dest_ACCEPT - [0:0]
:zone_wan_dest_REJECT - [0:0]
:zone_wan_forward - [0:0]
:zone_wan_input - [0:0]
:zone_wan_output - [0:0]
:zone_wan_src_REJECT - [0:0]
-A INPUT -i lo -m comment --comment "!fw3" -j ACCEPT
-A INPUT -m comment --comment "!fw3: Custom input rule chain" -j input_rule
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m comment --comment "!fw3" -j syn_flood
-A INPUT -i br-lan -m comment --comment "!fw3" -j zone_lan_input
-A INPUT -i eth0.2 -m comment --comment "!fw3" -j zone_wan_input
-A FORWARD -m comment --comment "!fw3: Custom forwarding rule chain" -j forwarding_rule
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
-A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_forward
-A FORWARD -i eth0.2 -m comment --comment "!fw3" -j zone_wan_forward
-A FORWARD -m comment --comment "!fw3" -j reject
-A OUTPUT -o lo -m comment --comment "!fw3" -j ACCEPT
-A OUTPUT -m comment --comment "!fw3: Custom output rule chain" -j output_rule
-A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
-A OUTPUT -o br-lan -m comment --comment "!fw3" -j zone_lan_output
-A OUTPUT -o eth0.2 -m comment --comment "!fw3" -j zone_wan_output
-A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-reset
-A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-unreachable
-A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 25/sec --limit-burst 50 -m comment --comment "!fw3" -j RETURN
-A syn_flood -m comment --comment "!fw3" -j DROP
-A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j ACCEPT
-A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
-A zone_lan_forward -p tcp -m tcp --dport 853 -m comment --comment "!fw3: ubus:https-dns-proxy[instance1] rule 1" -j reject
-A zone_lan_forward -p udp -m udp --dport 853 -m comment --comment "!fw3: ubus:https-dns-proxy[instance1] rule 1" -j reject
-A zone_lan_forward -m comment --comment "!fw3: Zone lan to wan forwarding policy" -j zone_wan_dest_ACCEPT
-A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
-A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
-A zone_lan_input -m comment --comment "!fw3: Custom lan input rule chain" -j input_lan_rule
-A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
-A zone_lan_input -m comment --comment "!fw3" -j zone_lan_src_ACCEPT
-A zone_lan_output -m comment --comment "!fw3: Custom lan output rule chain" -j output_lan_rule
-A zone_lan_output -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
-A zone_lan_src_ACCEPT -i br-lan -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT
-A zone_wan_dest_ACCEPT -o eth0.2 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
-A zone_wan_dest_ACCEPT -o eth0.2 -m comment --comment "!fw3" -j ACCEPT
-A zone_wan_dest_REJECT -o eth0.2 -m comment --comment "!fw3" -j reject
-A zone_wan_forward -m comment --comment "!fw3: Custom wan forwarding rule chain" -j forwarding_wan_rule
-A zone_wan_forward -p esp -m comment --comment "!fw3: Allow-IPSec-ESP" -j zone_lan_dest_ACCEPT
-A zone_wan_forward -p udp -m udp --dport 500 -m comment --comment "!fw3: Allow-ISAKMP" -j zone_lan_dest_ACCEPT
-A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
-A zone_wan_forward -m comment --comment "!fw3" -j zone_wan_dest_REJECT
-A zone_wan_input -m comment --comment "!fw3: Custom wan input rule chain" -j input_wan_rule
-A zone_wan_input -p udp -m udp --dport 68 -m comment --comment "!fw3: Allow-DHCP-Renew" -j ACCEPT
-A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment "!fw3: Allow-Ping" -j ACCEPT
-A zone_wan_input -p igmp -m comment --comment "!fw3: Allow-IGMP" -j ACCEPT
-A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
-A zone_wan_input -m comment --comment "!fw3" -j zone_wan_src_REJECT
-A zone_wan_output -m comment --comment "!fw3: Custom wan output rule chain" -j output_wan_rule
-A zone_wan_output -m comment --comment "!fw3" -j zone_wan_dest_ACCEPT
-A zone_wan_src_REJECT -i eth0.2 -m comment --comment "!fw3" -j reject
COMMIT
# Completed on Thu Oct 14 20:40:44 2021

That looks fine too. My only guess is that the firewall was simply not initialized for a brief period of time while your router rebooted which caused one or two connection attempts to "slip through". Especially if these were the only ones. Normally SSH servers are brute forced all the time, so if your port 22 would be exposed still, you'd see ongoing login attempts.

As for the cause of the reboot, it is likely not related to SSH but either an OOM condition or a Kernel OOPS/bug, e.g. due to instabilities in the wireless driver.

2 Likes

Sounds like a credible theory. The login attempt took place during start-up, probably at just the right moment.
Thanks for your effort. I was realy worried I had done something stupid. Keep up the good work.

Seems like you're okay. But if you're ever in doubt, you can always reset your router to defaults (take a backup first), and re-create your settings. The advantage here is that, instead of simply restoring your backup, you'll have the opportunity to review your settings as you go (but you'll have a backup to use as reference and/or to restore if you have any difficulties with the process of recreating everything).

And obviously you've come here, which is always good -- the forums are here to help in all sorts of ways :slight_smile:

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.