Dir 300 nrub rev b7. Connection to internet is pppoe.
Guess people need more info to try to help you out
Dis you have a look at system log ?
@vasinov Can you provide output of following commands on SSH?
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall
Also state what version of OpenWrt you are running in your router?
CHAOS CALMER (15.05.1, r48532)
Summary
root@OpenWrt:~# cat /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 'fd9e:6d3e:1a3e::/48'
config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option macaddr 'ae'
option type 'bridge'
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 force_link '1'
option _orig_ifnane 'eth0.2'
option _orig_bridge 'false'
option proto 'pppoe'
option username '&&'
option password '^^'
config interface 'wan6'
option ifname '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 '0 1 2 3 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
root@OpenWrt:~# cat /etc/config/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 localservice '1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
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'
root@OpenWrt:~# cat /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'
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 fe80::/10
option src_port 547
option dest_ip fe80::/10
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
include a file with users custom iptables rules
config include
option path /etc/firewall.user
EXAMPLE CONFIG SECTIONS
do not allow a specific ip to access wan
#config rule
option src lan
option src_ip 192.168.45.2
option dest wan
option proto tcp
option target REJECT
block a specific mac on wan
#config rule
option dest wan
option src_mac 00:11:22:33:44:66
option target REJECT
block incoming ICMP traffic on a zone
#config rule
option src lan
option proto ICMP
option target DROP
port redirect port coming in on wan to lan
#config redirect
option src wan
option src_dport 80
option dest lan
option dest_ip 192.168.16.235
option dest_port 80
option proto tcp
port redirect of remapped ssh port (22001) on wan
#config redirect
option src wan
option src_dport 22001
option dest lan
option dest_port 22
option proto tcp
allow IPsec/ESP and ISAKMP passthrough
config rule
option src wan
option dest lan
option proto esp
option target ACCEPT
config rule
option src wan
option dest lan
option dest_port 500
option proto udp
option target ACCEPT
FULL CONFIG SECTIONS
#config rule
option src lan
option src_ip 192.168.45.2
option src_mac 00:11:22:33:44:55
option src_port 80
option dest wan
option dest_ip 194.25.2.129
option dest_port 120
option proto tcp
option target REJECT
#config redirect
option src lan
option src_ip 192.168.45.2
option src_mac 00:11:22:33:44:55
option src_port 1024
option src_dport 80
option dest_ip 194.25.2.129
option dest_port 120
option proto tcp
root@OpenWrt:~#
how can I do it?
logread
or
dmesg
Not sure check for something about error or that doesn’t sound look good
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: Connect: pppoe-wan <--> eth0.2
Sun Jan 31 15:51:17 2016 daemon.info pppd[1232]: CHAP authentication succeeded
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: CHAP authentication succeeded
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: peer from calling number 00:06:00:00:00:02 authorized
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: local IP address 194.32.**.**
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: remote IP address 10.10.10.10
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: primary DNS address 87.255.238.65
Sun Jan 31 15:51:17 2016 daemon.notice pppd[1232]: secondary DNS address 87.255.238.75
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Network device 'pppoe-wan' link is up
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 31 15:51:17 2016 daemon.info dnsmasq[1052]: reading /tmp/resolv.conf.auto
Sun Jan 31 15:51:17 2016 daemon.info dnsmasq[1052]: using local addresses only for domain lan
Sun Jan 31 15:51:17 2016 daemon.info dnsmasq[1052]: using nameserver 87.255.238.65#53
Sun Jan 31 15:51:17 2016 daemon.info dnsmasq[1052]: using nameserver 87.255.238.75#53
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Network alias 'pppoe-wan' link is up
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Interface 'wan_6' is enabled
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Interface 'wan_6' has link connectivity
Sun Jan 31 15:51:17 2016 daemon.notice netifd: Interface 'wan_6' is setting up now
Sun Jan 31 15:51:18 2016 user.notice firewall: Reloading firewall due to ifup of wan (pppoe-wan)
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1052]: exiting on receipt of SIGTERM
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: started, version 2.73 cachesize 150
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: DNS service limited to local subnets
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq-dhcp[1334]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: using local addresses only for domain lan
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: reading /tmp/resolv.conf.auto
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: using local addresses only for domain lan
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: using nameserver 87.255.238.65#53
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: using nameserver 87.255.238.75#53
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: read /etc/hosts - 1 addresses
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq[1334]: read /tmp/hosts/dhcp - 1 addresses
Sun Jan 31 15:51:19 2016 daemon.info dnsmasq-dhcp[1334]: read /etc/ethers - 0 addresses
Fri Mar 15 13:53:36 2019 daemon.info pppd[1232]: System time change detected.
Fri Mar 15 13:54:12 2019 kern.info kernel: [ 8207.310000] rt305x-esw 10110000.esw: link changed 0x00
Fri Mar 15 13:54:14 2019 kern.info kernel: [ 8209.000000] rt305x-esw 10110000.esw: link changed 0x08
Fri Mar 15 13:54:14 2019 kern.info kernel: [ 8209.250000] rt305x-esw 10110000.esw: link changed 0x18
Is that what's installed by default? Ports 0 to 3 are LAN, 4 is WAN, 6 is CPU? Where and what is 5?
Edit: in https://openwrt.org/toh/d-link/dir-300revb (presuming it's very similar if not the same router) it says:
For connection of STB, or replacement of one of LAN ports on WAN (in case of faulty WAN) we involve the 4th port of a router of dir300b1 - in other port won't work! Example /etc/config/network:
config switch_vlan option device 'rt305x' option vlan '1' option ports '1 2 3 6t' config switch_vlan option device 'rt305x' option vlan '2' option ports '0 4 6t'
So it appears to me that 0 is WAN, then 1 to 4 are LAN? Or are LAN ports numbered backwards?
after hard reset, i change only this section:
config interface 'wan'
option ifname 'eth0.2'
option force_link '1'
option _orig_ifnane 'eth0.2'
option _orig_bridge 'false'
option proto 'pppoe'
option username '&&&'
option password '&&&'
Out of curiosity, is ru in Dir 300 nrub rev b7 sands for Russia? is it different than D-Link Dir-300 B7 in https://openwrt.org/toh/d-link/dir-300revb? Because it appears that there is 18.06.01 for it, which should be a lot more secure than Chaos Chalmer.
OK just be sure, the router itself has internet connectivity? If you ping a domain or an outside IP from SSH, you get a reply?
Dir 300 nrub rev b7,It was bought in Russia
that I flash - http://downloads.openwrt.org/releases/18.06.1/targets/ramips/rt305x/openwrt-18.06.1-ramips-rt305x-dir-300-b7-initramfs-kernel.bin
itself has internet connectivity, ping ok
Not Chaos Calmer then!
I imagine you must have tried it, but if not, could you try plugging the cable to a different port, just to clear the confusion with the numbering? Port 2 or 3 would be best.
Wait!! You flashed a ram image? How is it that your device is able to boot? You should flash a sysupgrade image. The one which doesnt have initramfs
in it and should have sysupgrade
in the name.
It's what's listed in the device page. All other revisions in the have install file name ending squashfs-factory.bin
except this one, it's name is as you see.
I don't know if it's wrong file name or wrong file.
Edit: It's probably the wrong file. That could explain why he says it Chaos Calmer! I imagine it didn't actually flash it, so the router now is in fact running Chaos Calmer!
now I flash http://downloads.openwrt.org/releases/18.06.1/targets/ramips/rt305x/openwrt-18.06.1-ramips-rt305x-dir-300-b7-squashfs-sysupgrade.bin, then I change Wan Protocol to pppoe and set username and password. from Pc connected to 2 lan I have no pings, from routers Diagnostics page :
PING openwrt.org (139.59.209.225): 56 data bytes
64 bytes from 139.59.209.225: seq=0 ttl=58 time=61.360 ms
64 bytes from 139.59.209.225: seq=1 ttl=58 time=60.260 ms
64 bytes from 139.59.209.225: seq=2 ttl=58 time=60.327 ms
64 bytes from 139.59.209.225: seq=3 ttl=58 time=60.348 ms
64 bytes from 139.59.209.225: seq=4 ttl=58 time=60.409 ms
--- openwrt.org ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 60.260/60.540/61.360 ms
BusyBox v1.28.3 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.1, r7258-5eb055306f
-----------------------------------------------------
root@OpenWrt:~# car /etc/config/^C
root@OpenWrt:~# cat /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 'fdc4:5579:da96::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config device 'lan_dev'
option name 'eth0.1'
option macaddr 'ae:f1:df:2a:53:9a'
config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option username '%%'
option password '%%'
option ipv6 'auto'
config device 'wan_dev'
option name 'eth0.2'
option macaddr 'ae:f1:df:2a:53:9b'
config interface 'wan6'
option ifname '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 '0 1 2 3 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
root@OpenWrt:~# cat /etc/config/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 start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'
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'
root@OpenWrt:~# cat /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'
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
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# port redirect of remapped ssh port (22001) on wan
#config redirect
# option src wan
# option src_dport 22001
# option dest lan
# option dest_port 22
# option proto tcp
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
What is this?
Also try to use the Preformatted text tool (highlited in the iamge below) when including code.