SSH via WiFi blocked by firewall

I will . Plz give me some time .. in office right now

OK, so let me clarify some things before you'll back.
My [carambola8_with_OpenWRT] is device with some sensors. It collects data and sends it to another device in local network. So it need to be visible for another devices in this local network and vice versa (including ssh connection). I have 2 revisions of [carambola8_with_OpenWRT]. First one utilizes eth0 interface, and eth1 is not connected. Second revision uses eth1 interface, and eth0 is not connected. I have single firmware for both revisions, so I'd like to have eth0 and eth1 bridged. I need 2 configs: dhcp and static IP's.
Below are both configs I've made so far. Config with DHCP is working fine, but static not, network is unreachable. I didn't change firewall and wireless configs since I post it here last time.
Summarizing:

  • wifi and ethernet connection
  • eth0 and eth1 bridged
  • ssh connections
  • dhcp IP config
  • static IP config

Static config (seems to be working fine):

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       'fdd3:9a1a:c9d9::/48'
                                                     
config interface 'lan'                         
        option  ifname          'eth0 eth1'    
        option  type            'bridge'       
        option proto            'dhcp'                  
                                               
config interface 'wlan'                        
        option proto            'dhcp'         
                                               
config interface 'wan'                         
        option proto            'dhcp'         
        option ipv6             'auto'

DHCP config (not working):

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       'fdd3:9a1a:c9d9::/48'
                                                     
config interface 'lan'                
        option  ifname          'eth0 eth1'
		option	type			'bridge'
        option  proto           'static'        
        option  ipaddr          '192.168.2.88'        
        option  netmask         '255.255.252.0'        
        option  gateway         '192.168.2.1'  
        list    dns             '192.168.2.1'  
        list    dns             '8.8.8.8'              
                                                       
config interface 'wlan'                            
        option  proto           'static'        
        option  ipaddr          '192.168.2.89'        
        option  netmask         '255.255.252.0'        
        option  gateway         '192.168.2.1'  
        list    dns             '192.168.2.1'  
        list    dns             '8.8.8.8'
                                      
config interface 'wan'                
        option  proto           'dhcp'
        option  ipv6            'auto'

hi plz send config files in sets

in working case ( network + firewall + wireless )

in non working case ( network + firewall + wireless )

Latest one

DHCP config (seems to be working fine).

/etc/config/network

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       'fdd3:9a1a:c9d9::/48'
                                                     
config interface 'lan'                         
        option  ifname          'eth0 eth1'    
        option  type            'bridge'       
        option proto            'dhcp'                  
                                               
config interface 'wlan'                        
        option proto            'dhcp'         
                                               
config interface 'wan'                         
        option proto            'dhcp'         
        option ipv6             'auto'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'wlan'
        option mode 'sta'
        option ssid 'myssid'
        option encryption 'psk2'
        option key 'mypass'

/etc/config/firewall

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'
        list   network          'wlan'
        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
                                   
# Include a file with users custom iptables rules
config include 
        option path             /etc/firewall.user

Static config (not working).

/etc/config/network

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       'fdd3:9a1a:c9d9::/48'
                                                     
config interface 'lan'                
        option  ifname          'eth0 eth1'
		option	type			'bridge'
        option  proto           'static'        
        option  ipaddr          '192.168.2.88'        
        option  netmask         '255.255.252.0'        
        option  gateway         '192.168.2.1'  
        list    dns             '192.168.2.1'  
        list    dns             '8.8.8.8'              
                                                       
config interface 'wlan'                            
        option  proto           'static'        
        option  ipaddr          '192.168.2.89'        
        option  netmask         '255.255.252.0'        
        option  gateway         '192.168.2.1'  
        list    dns             '192.168.2.1'  
        list    dns             '8.8.8.8'
                                      
config interface 'wan'                
        option  proto           'dhcp'
        option  ipv6            'auto'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'wlan'
        option mode 'sta'
        option ssid 'myssid'
        option encryption 'psk2'
        option key 'mypass'

/etc/config/firewall

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'
        list   network          'wlan'
        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
                                   
# Include a file with users custom iptables rules
config include 
        option path             /etc/firewall.user

Route command output in these cases plz . and dest ip that you ssh upon ? what was that

I do ssh from 192.168.2.148 to [carambola8_with_OpenWRT] (which is in the same subnet).

Route command output (dhcp config):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.2.1     0.0.0.0         UG    0      0        0 wlan0
192.168.2.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.2.0     *               255.255.255.0   U     0      0        0 wlan0

Route command output (static config):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.2.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     *               255.255.252.0   U     0      0        0 br-lan
192.168.0.0     *               255.255.252.0   U     0      0        0 wlan0

On static config, I can (from my OpenWrt device) ping 8.8.8.8, no matter it is wifi or ethernet connection.
But working only on wifi, I can't ping devices from my local network 192.168.2.*
When I disable WiFi, ethernet connection works fine. I can ping 8.8.8.8 and devices from my local network 192.168.2.*

DHCP config works for all interfaces, static config works fine for eth interface, but on wifi connection I cannot ping devices from my local network.

Sorry for delay , in 30 mins I ll be home and solve your problems for sure

@pawel_ub . verify the diagram . i ll explain queries after dinner ( 15 mins )

When the Link is configured for DHCP ( either wired or wireless) configuration that link get is
192.168.2.x
255.255.255.0
192.168.2.1

on static implementation you are pushing manually below settings
192.168.2.x
255.255.252.0
192.168.2.1

there are multiple things to discuss , let me know when you can be here

Your picture shows a wired and wireless link between the 2 routers. Please verify these links do not connect the same networks on both devices, respectively.

No they are uplink , only one is active at a time either wired or wireless

there are multiple issues with this configuration according to me

hi @lleachii this topic of @pawel_ub is very nice and covering a lot of concepts that i think will be useful for this community.

As in this post, multiple config changes happened so its difficuilt to point out and discuss the impact

what do you guys suggest ? continue with this post or new one ?

If you are referring to the Original Poster's topic, then here.


But...If you're serious about other threads...I would suggest an announcement about a software that can manage routers of multiple software vendors:

I think you didn't interpret that post correctly ,
Let me reframe that

Suppose you have 10 access points of different vendors and 5 Cisco , 3 ruckus ,2 unifi .
I just found a way in which an openwrt router will come in picture to manage all the clients accross diff vendor AP and under simple hotspot solution like coova chilli

That is a hotspot of hydrid hardware consisting of openwrt compatible as well as non compatible routers

This can merged into an ipk kind of package and a optional feature with toggle state

Hi @arjuniet
I've changed option netmask to 255.255.255.0 in my static config interface wlan as you pointed out.
After that change I can ping devices from my local network, while connected via wifi.
However option netmask in my static config interface lan is still 255.255.252.0, beacouse if I change it to 255.255.255.0, I cannot ping devices in my local network while connected via wifi.
There are any next steps, or this config is finally good?