# Easytether questions



## cjr (Apr 22, 2020)

Good morning.  I'm trying to get easytether working on FreeBSD 12.1.   I've installed the FreeBSD package provided by the vendor.  I have verified that easytether works on my phone.

My setup is a desktop computer that is plugged in to my local LAN.  I get an address from my router using DHCP. When I use the same basic setup under Linux, all I have to do is run `easytether-usb` and then `systemctl restart systemd-networkd` to get it working.  This gives me an Internet connection over the cell phone, but still lets me ssh locally.
On FreeBSD, when I run `easytether-usb -t tap1` my routing table looks like

```
netstat -rn4
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            10.0.4.1           UGS         em0
10.0.4.0/24        link#1             U           em0
10.0.4.56          link#1             UHS         lo0
127.0.0.1          link#2             UH          lo0
192.168.117.0/24   link#5             U          tap1
192.168.117.1      link#5             UHS         lo0
```

I have to also run `dhclient tap1` to get an address.  All this works fine, but my traffic still goes out em0.  I feel like I'm close to getting this working, but I don't understand networking as well as I probably should.  Can someone help me?


----------



## SirDice (Apr 22, 2020)

cjr said:


> All this works fine, but my traffic still goes out em0.  I feel like I'm close to getting this working, but I don't understand networking as well as I probably should.


Look at your default gateway, that's still pointing out of em0. While the link is up on tap1 your routing table is still set to 10.0.4.1 via em0. You need to adjust your routing table, usually by removing the existing default gateway and adding a new gateway with the correct address to route the traffic via tap1.


----------



## cjr (Apr 22, 2020)

SirDice said:


> Look at your default gateway, that's still pointing out of em0. While the link is up on tap1 your routing table is still set to 10.0.4.1 via em0. You need to adjust your routing table, usually by removing the existing default gateway and adding a new gateway with the correct address to route the traffic via tap1.


I'm at work now, so I don't have access to the machine.  I'll look into it more when I get home.  Thank you.


----------



## cjr (Apr 23, 2020)

I've deleted the default route, added the one provided by easytether, and adjusted my DNS settings.  My traffic still isn't going out.  I can't ping by hostname or IP address.


----------



## SirDice (Apr 23, 2020)

Focus on plain TCP/IP first, if that doesn't work then name resolving certainly isn't going to work either. 

Show  the "new" routing table,  `netstat -rn`


----------



## cjr (Apr 24, 2020)

Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.117.1      UGS        tap1
10.0.4.0/24        link#1             U           em0
10.0.4.56          link#1             UHS         lo0
127.0.0.1          link#2             UH          lo0
192.168.117.0/24   link#5             U          tap1
192.168.117.2      link#5             UHS         lo0


----------



## cjr (Apr 24, 2020)

It was DNS.  For some reason, `ping -c3 1.1.1.1` was still trying to use a hostname (one.one.one.one).  I just had to add an external dns server to resolv.conf.  tcpdump to the rescue. 
How do I mark this as solved?


----------



## SirDice (Apr 24, 2020)

cjr said:


> How do I mark this as solved?


Edit the post that started this thread.


----------



## T-Daemon (Apr 24, 2020)

cjr said:


> I get an address from my router using DHCP





cjr said:


> I just had to add an external dns server to *resolv.conf*.


That entry will be overwritten by resolvconf(8). Instead of setting in /etc/resolv.conf, set the external DNS in the router, or let it set in /etc/resolv.conf but also set in /etc/resolvconf.conf `resolvconf=NO` (resolvconf.conf(5)), to disable resolvconf(8).


----------

