Dashboard DNS labeled as Gateway

dashboard

(Davide Principi) #1

My NethServer 6.6 acting as gateway shows the following status on the Dashboard page:

It seems like the DNS addresses are displayed on the wrong line.

Could you reproduce it?


(Massimo Palazzetti) #2

On my Nethserver 6.6 the gateway value is empty.
It’s a Server&Gateway configuration.


(Artem Fedai) #3

@davidep @filippo_carletti


(Davide Principi) #4

Thanks @nas for diving into the code!

The line you changed searched for gateway value on green interfaces only.

  • As we can see, it does not work on systems with red.
  • I think changing green to red should not work on systems without red.

Could we just print the output of (?)

ip route | grep ^default

default via XXX.XXX.XXX.XXX dev ethY


(Artem Fedai) #5

or search in bose Green and RED but it wouldnt show PPPoe so better use
ip route | grep ^default | awk ‘{print $3}’


(Davide Principi) #6

awk :astonished: ??

ok ok ok, that was just an idea.

If we’ll implement it, let’s parse ip route output with PHP :blush:


(Artem Fedai) #7

Have Implemented :slight_smile:


(Artem Fedai) #8

(Davide Principi) #9

Great @nas, your PR on GitHub make me feel Redmine is redundant :wink:


(Filippo Carletti) #10

You forgot a case: multiwan in balance mode.
In that configuration, the default gateway is empty.
I think that the idea is to show the configured gateway, so:
if red is not present show green def gw
if red is present show gw for every red

Maybe @giacomo has a better idea.


(Artem Fedai) #11

http://dev.nethserver.org/users/365

@filippo_carletti why in multiwan default gw is empty ?
it should be like :
default via 172.31.229.116 dev pppoe-wan_2 proto static metric 30
default via 193.34.92.254 dev pppoe-wan proto static metric 40


(Filippo Carletti) #12

Because shorewall uses a table named balance.
You’d see your two default lines with:

ip ro sh ta balance

(Artem Fedai) #13

I could not implement 2 GW so show output pls
and
ip ro sh


(Filippo Carletti) #14
[root@mail ~]# ip route | grep ^default | awk '{print $3}'
[root@mail ~]#

(Artem Fedai) #15

could you show pls
ip ro sh


(Filippo Carletti) #16
[root@mail ~]# ip ro
192.168.71.1 dev eth2  scope link  src 192.168.71.244 
192.168.36.2 dev tun2  proto kernel  scope link  src 192.168.36.1 
192.168.3.2 dev tun3  proto kernel  scope link  src 192.168.3.1 
208.67.222.222 via 192.168.71.1 dev eth2 
192.168.4.1 dev tun0  proto kernel  scope link  src 192.168.4.2 
192.168.2.2 dev tun4  proto kernel  scope link  src 192.168.2.1 
192.168.35.2 dev tun1  proto kernel  scope link  src 192.168.35.1 
8.8.8.8 via 192.168.61.1 dev eth1 
10.100.90.2 dev tun5  proto kernel  scope link  src 10.100.90.1 
192.168.61.1 dev eth1  scope link  src 192.168.61.58 
10.100.12.0/24 via 192.168.35.2 dev tun1 
192.168.71.0/24 dev eth2  proto kernel  scope link  src 192.168.71.244 
10.100.90.0/24 via 10.100.90.2 dev tun5 
192.168.1.0/24 via 192.168.4.1 dev tun0 
10.100.20.0/24 via 192.168.36.2 dev tun2 
192.168.61.0/24 dev eth1  proto kernel  scope link  src 192.168.61.58 
10.100.1.0/24 dev eth0  proto kernel  scope link  src 10.100.1.244 
10.100.3.0/24 via 192.168.3.2 dev tun3 
10.100.2.0/24 via 192.168.2.2 dev tun4 
169.254.0.0/16 dev eth0  scope link  metric 1002 
169.254.0.0/16 dev eth1  scope link  metric 1003 
169.254.0.0/16 dev eth2  scope link  metric 1004 
[root@mail ~]#

(Artem Fedai) #17

it is all non PPPoE , it cold be matched from DB but PPPoE have no GW in DB


(Artem Fedai) #18

@filippo_carletti could you show pls
ip ru


(Filippo Carletti) #19
[root@mail ~]# ip ru
0:	from all lookup local 
999:	from all lookup main 
10000:	from all fwmark 0x10000/0xf0000 lookup fweb 
10001:	from all fwmark 0x20000/0xf0000 lookup telco 
20000:	from 192.168.71.244 lookup telco 
20000:	from 192.168.61.58 lookup fweb 
20000:	from 192.168.61.3 lookup fweb 
32765:	from all lookup balance 
32767:	from all lookup default 
[root@mail ~]#

(Artem Fedai) #20

now i see the logic thanks