Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not detect gateway [MacOS] #645

Closed
ritwickdey opened this issue Oct 31, 2019 · 1 comment
Closed

Could not detect gateway [MacOS] #645

ritwickdey opened this issue Oct 31, 2019 · 1 comment

Comments

@ritwickdey
Copy link

Description of the bug or feature request:

Getting [sys.log] [war] Could not detect gateway. when I run bettercap.

Environment: MacOs Catalina 10.15

Please provide:

  • Bettercap version you are using ( bettercap -version ). 2.16.1
  • OS version and architecture you are using. x64
  • Go version if building from sources.
  • Command line arguments you are using. go version go1.12.6 darwin/amd64.

Logs:

Command: bettercap -iface en1 --debug

output:


bettercap v2.26.1 (built for darwin amd64 with go1.12.6) [type 'help' for a list of commands]

192.168.1.0/24 > 192.168.1.25  » [16:24:34] [sys.log] [dbg] FindGateway(en1) [cmd=netstat opts=[-n -r] parser=^([a-z]+)+\s+(\d+\.+\d+.\d.+\d)+\s+([a-zA-z]+)+\s+(\d+)+\s+(\d+)+\s+([a-zA-Z]+\d+)$]
192.168.1.0/24 > 192.168.1.25  » [16:24:34] [sys.log] [dbg] FindGateway(en1) output:
Routing tables

Internet:
Destination        Gateway            Flags        Netif Expire
default            192.168.1.1        UGSc           en1
127                127.0.0.1          UCS            lo0
127.0.0.1          127.0.0.1          UH             lo0
169.254            link#5             UCS            en1      !
192.168.1          link#5             UCS            en1      !
192.168.1.1/32     link#5             UCS            en1      !
192.168.1.1        ec:84:b4:40:af:b0  UHLWIir        en1   1198
192.168.1.25/32    link#5             UCS            en1      !
224.0.0/4          link#5             UmCS           en1      !
224.0.0.251        1:0:5e:0:0:fb      UHmLWI         en1
239.255.255.250    1:0:5e:7f:ff:fa    UHmLWI         en1
255.255.255.255/32 link#5             UCS            en1      !

Internet6:
Destination                             Gateway                         Flags         Netif Expire
default                                 fe80::%utun0                    UGcI          utun0
default                                 fe80::%utun1                    UGcI          utun1
::1                                     ::1                             UHL             lo0
fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
fe80::1%lo0                             link#1                          UHLI            lo0
fe80::%en1/64                           link#5                          UCI             en1
fe80::1%en1                             ec:84:b4:40:af:b0               UHLWIi          en1
fe80::49c:9920:7edc:b7df%en1            88:1f:a1:11:d4:8c               UHLI            lo0
fe80::%awdl0/64                         link#7                          UCI           awdl0
fe80::c869:20ff:fe3f:2bae%awdl0         ca:69:20:3f:2b:ae               UHLI            lo0
fe80::%utun0/64                         fe80::3b70:5546:d644:3486%utun0 UcI           utun0
fe80::3b70:5546:d644:3486%utun0         link#11                         UHLI            lo0
fe80::%utun1/64                         fe80::85f4:4c6e:1551:9a67%utun1 UcI           utun1
fe80::85f4:4c6e:1551:9a67%utun1         link#12                         UHLI            lo0
ff01::%lo0/32                           ::1                             UmCI            lo0
ff01::%en1/32                           link#5                          UmCI            en1
ff01::%awdl0/32                         link#7                          UmCI          awdl0
ff01::%utun0/32                         fe80::3b70:5546:d644:3486%utun0 UmCI          utun0
ff01::%utun1/32                         fe80::85f4:4c6e:1551:9a67%utun1 UmCI          utun1
ff02::%lo0/32                           ::1                             UmCI            lo0
ff02::%en1/32                           link#5                          UmCI            en1
ff02::%awdl0/32                         link#7                          UmCI          awdl0
ff02::%utun0/32                         fe80::3b70:5546:d644:3486%utun0 UmCI          utun0
ff02::%utun1/32                         fe80::85f4:4c6e:1551:9a67%utun1 UmCI          utun1
192.168.1.0/24 > 192.168.1.25  » [16:24:34] [sys.log] [dbg] FindGateway(en1): nothing found :/
192.168.1.0/24 > 192.168.1.25  » [16:24:34] [sys.log] [war] Could not detect gateway.
192.168.1.0/24 > 192.168.1.25  » [16:24:34] [session.started] {session.started 2019-10-31 16:24:34.990583 +0530 IST m=+0.199879271 <nil>}


@Bedrovelsen
Copy link

Does it also have this issue if you use -iface en0?

Perhaps it is true that no gateway exists for the interface en1 as it is currently configured?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants