I'm trying to bring up a little box on my network. I just reflashed the firmware and it's supposed to come up as 192.168.1.1
by default. My router is a DSL modem at 192.168.0.1
; it usually uses a netmask of 255.255.255.0
, so I can't talk to the new box.
I telnet into the router and use ifconfig
to change the netmask to 255.255.0.0
, but I still can't ping 192.168.1.1
. (Apparently I'm supposed to use ip
now, but I know ifconfig
better.)
I figure maybe iptables
is getting in my way, so I try this:
iptables -F; iptables -X; iptables -t nat -F; iptables -t nat -X; iptables -t mangle -F;
iptables -t mangle -X; iptables -P INPUT ACCEPT; iptables -P OUTPUT ACCEPT; iptables -P FORWARD ACCEPT
and sure enough now I see:
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Which looks good to me, but still when I try ping 192.168.1.1
I get no reply.
But if I do this while running # tcpdump -n -i br0 -v host 192.168.1.1
, I see this:
tcpdump: listening on br0, link-type EN10MB (Ethernet), capture size 68 bytes
15:09:21.057458 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.0.1 > 192.168.1.1: ICMP echo request, id 26859, seq 1, length 64
15:09:25.036912 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.0.1, length 28
15:09:25.037321 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.1 is-at 00:18:39:2c:9c:30, length 46
That arp
reply has a MAC address matching my new box! So why can't my packets get there and back?
# ip route show
205.171.X.X via 72.160.X.1 dev ppp0
72.160.X.X dev ppp0 proto kernel scope link src 72.160.X.X
205.141.X.X via 72.160.X.1 dev ppp0
192.168.0.0/16 dev br0 proto kernel scope link src 192.168.0.1
default via 72.160.X.1 dev ppp0
I'm pretty sure it's a problem with the router, not the target box. What could it be?