ARP traffic from unexpected source address

Whilst troubleshooting yesterday on a v19.07.5 BT HomeHub 5 configured in Wireless Bridge mode , I've come across some ARP traffic that I can't explain:

Frame 157: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Ethernet II, Src: one.one.one.one (c8:91:f9:54:01:46), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
    Source: one.one.one.one (c8:91:f9:54:01:46)
    Type: ARP (0x0806)
    Trailer: 0000000135544954414e0000000000000000
Address Resolution Protocol (request)
    Hardware type: Ethernet (1)
    Protocol type: IPv4 (0x0800)
    Hardware size: 6
    Protocol size: 4
    Opcode: request (1)
    Sender MAC address: one.one.one.one (c8:91:f9:54:01:46)
    **Sender IP address: one.one.one.one (1.1.1.1)**
    Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Target IP address: 192.168.1.108 (192.168.1.108)

I see the ARP at the gateway, and they are correctly formed, with the reply address as the real IP of the homehub. Further investigation has led me to observe that both of the hosts connected to the lan-side of the bridge have an ARP cache entry for 1.1.1.1 pointing to the MAC address of the bridge, as does every entry in the cache on both servers (both Ubuntu 20.04.1), suggesting an ARP spoofing attack. I could only remove the arp entry by disabling arp and re-enabling, but it returned within a few seconds. The cache on the HomeHub looks right, just the two devices in the cache on br-lan, loads on wlan0.

Only one (misconfigured, now fixed) device has used 1.1.1.1 as a resolver, all the traffic was blocked according to my firewall, and it is on a different layer 3 network (all my wireless traffic is on it's own firewall physical interface 192.168.1.x/24, all the wired kit is also segregated the same way on 192.168.2.0/24), and traffic to 1.1.1.1 can't route between them.

Scratching my head now, and sleeping on it hasn't made a difference. I feel this forum is the place to start, as the HomeHub seems to be central to this, as I don't see this occurring anywhere else.

So to my questions

  1. my device is acting as a bridge, so why are the ARP cache entries pointed at it? I would expect a list of local IPs and the default gateway
  2. Does Open-wrt have any internal awareness of 1.1.1.1?
  3. any clue what might be causing these behaviours?

Worth pointing out that, as far as I can see, I have no connectivity or functionality issues at layer 8, I just can't explain what I'm seeing.

TIA
DM

1.1.1.1 is the IP address of a public DNS, perhaps you configured it on the router or on some of your devices.

What MAC address is associated with that IP address? Perhaps the gateway's?

The associated MAC address is the open-wrt device. As I noted in the post, the only device that was using 1.1.1.1 was doing so by mistake, and is on a different subnet.

This MAC belongs to some Sagem
Do you have such a device, have you identified which one is it?
A device with address 1.1.1.1 should never ask for arp of 192.168.1.X, so there might be some mistake in addresses/subnets.

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
1 Like

Thank you @trendy - the bridge running openwrt is actually a repurposed ADSL router made by Sagemcom, and supplied by BT to residential and business customers (TakTalk in the UK do the same, but with different devices - i've been in the game for 30 years, and i never heard of Sagemcom until about a month ago, now i've found them twice!). Output as requested:

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.5, r11257-5090152ae3
 -----------------------------------------------------
root@OpenWrt:~# ubus call system board; \
> uci export network; uci export wireless; \
> uci export dhcp; uci export firewall; \
> head -n -0 /etc/firewall.user; \
> ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
> ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
{
        "kernel": "4.14.209",
        "hostname": "OpenWrt",
        "system": "xRX200 rev 1.2",
        "model": "BT Home Hub 5A",
        "board_name": "bt,homehub-v5a",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.5",
                "revision": "r11257-5090152ae3",
                "target": "lantiq/xrx200",
                "description": "OpenWrt 19.07.5 r11257-5090152ae3"
        }
}
package 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 'fd91:8edb:9b88::/48'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'a'
        option tone 'av'
        option ds_snr_offset '0'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'dhcp'

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr 'c8:91:f9:54:01:46'

config device 'wan_dsl0_dev'
        option name 'dsl0'
        option macaddr 'c8:91:f9:54:01:47'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 4 6t'

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

config interface 'wwan_bridge'
        option proto 'relay'
        list network 'lan'
        list network 'wwan'
        option ipaddr '192.168.1.240'

config interface 'wwan'
        option proto 'dhcp'

package wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
        option htmode 'VHT80'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option disabled '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:0e.0'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-iface 'wifinet2'
        option ssid 'DCHOME'
        option device 'radio0'
        option mode 'sta'
        option key 'xxxxxxxxxxx'
        option network 'wwan'
        option encryption 'psk2'

package dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option ignore '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

package firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option network 'lan wwan wwan_bridge'

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

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

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'

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'

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'

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'

config include
        option path '/etc/firewall.user'

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    inet 192.168.1.248/24 brd 192.168.1.255 scope global wlan0
       valid_lft forever preferred_lft forever
192.168.1.110 dev br-lan table 16801 scope link 
192.168.1.122 dev br-lan table 16801 scope link 
default via 192.168.1.100 dev wlan0 table 16802 
169.254.39.37 dev wlan0 table 16802 scope link 
169.254.51.88 dev wlan0 table 16802 scope link 
169.254.133.20 dev wlan0 table 16802 scope link 
192.168.1.100 dev wlan0 table 16802 scope link 
192.168.1.102 dev wlan0 table 16802 scope link 
192.168.1.106 dev wlan0 table 16802 scope link 
192.168.1.108 dev wlan0 table 16802 scope link 
192.168.1.113 dev wlan0 table 16802 scope link 
192.168.1.251 dev wlan0 table 16802 scope link 
192.168.1.252 dev wlan0 table 16802 scope link 
192.168.1.253 dev wlan0 table 16802 scope link 
192.168.1.254 dev wlan0 table 16802 scope link 
default via 192.168.1.100 dev wlan0  src 192.168.1.248 
192.168.1.0/24 dev wlan0 scope link  src 192.168.1.248 
broadcast 127.0.0.0 dev lo table local scope link  src 127.0.0.1 
local 127.0.0.0/8 dev lo table local scope host  src 127.0.0.1 
local 127.0.0.1 dev lo table local scope host  src 127.0.0.1 
broadcast 127.255.255.255 dev lo table local scope link  src 127.0.0.1 
broadcast 192.168.1.0 dev wlan0 table local scope link  src 192.168.1.248 
local 192.168.1.248 dev wlan0 table local scope host  src 192.168.1.248 
broadcast 192.168.1.255 dev wlan0 table local scope link  src 192.168.1.248 
0:      from all lookup local 
2:      from all iif lo lookup 16800 
2:      from all iif wlan0 lookup 16801 
2:      from all iif br-lan lookup 16802 
32766:  from all lookup main 
32767:  from all lookup default 
ls: /tmp/resolv.*/*: No such file or directory
lrwxrwxrwx    1 root     root            16 Dec  6 07:31 /etc/resolv.conf -> /tmp/resolv.conf
lrwxrwxrwx    1 root     root            21 Jan 15 20:01 /tmp/resolv.conf -> /tmp/resolv.conf.auto
-rw-r--r--    1 root     root            85 Jan 15 20:01 /tmp/resolv.conf.auto
==> /etc/resolv.conf <==
# Interface wwan
nameserver 192.168.2.104
nameserver 192.168.1.100
search dchome.lan

==> /tmp/resolv.conf <==
# Interface wwan
nameserver 192.168.2.104
nameserver 192.168.1.100
search dchome.lan

==> /tmp/resolv.conf.auto <==
# Interface wwan
nameserver 192.168.2.104
nameserver 192.168.1.100
search dchome.lan
head: /tmp/resolv.*/*: No such file or directory
root@OpenWrt:~# 

I've left the MAC addresses in (there's only two) as I feel they are relevant to the issue.

Also, looking at the arp cache this morning, I see 3 entries for 169.254 addresses, all referring to the default gateway's MAC address.from the route table above, these are the 3:

169.254.39.37
169.254.51.88
169.254.133.20

The only one I can match in the firewall logs is the last one, and it seems that my HP wireless printer (192.168.1.113) was attempting to connect to it.

Thanks again
DM

The guide mentions static protocol and 192.168.2.1/24 IP (something outside the network of wwan)

There seem to be custom routing tables here. I guess they are leftovers from previous configuration.
Better reset to defaults and follow the guide without deviations.

1 Like

OK, reset to factory defaults and reconfigured as per the guidance. Whole lot of self-induced mess in between times (accidentally used ip ru del which broke the connection permanently, and the reset button doesn't work, so it was back to the soldering iron and a serial interface!)

root@OpenWrt:/# ip -4 ru
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default
<create bridge>
root@OpenWrt:/# ip -4 ru
0:      from all lookup local
2:      from all iif lo lookup 16800
2:      from all iif wlan0 lookup 16801
2:      from all iif br-lan lookup 16802
32766:  from all lookup main
32767:  from all lookup default
root@OpenWrt:/#

The rules are still there, and are created at the step where I create the relay bridge. I've put a more appropriate IP in, and there is no sign of 1.1.1.1. The arp entries still don't make sense, as a bridge should not be changing the source MAC address (or is this just how relayd works?)

user@splunk:~$ arp -a
printer.dchome.lan (192.168.1.113) at c8:91:f9:54:01:46 [ether] on eno1
? (192.168.3.1) at c8:91:f9:54:01:46 [ether] on eno1
_gateway (192.168.1.100) at c8:91:f9:54:01:46 [ether] on eno1

I'll keep a lookout for it breaking over the rest of the day. Appreciate your help, thank you.

Yes, they seem to be part of the relayd. In that case they are fine.

It is not exactly a bridge, so I would not expect to see everything the same way as it would appear on a bridge.
Also keep in mind that the IP address of the relay doesn't have a mask, so it most likely is acting as if the mask is /32
As long as everything is working fine for all the hosts from both sides and the 1.1.1.1 is not there anymore you should be fine.

1 Like

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