dch
Developer
My iphone 6s+ (the continent-sized one) is recognised in 11.0-CURRENT now:
I've been doing the following to set up tethering:
Which works, however I still need to (manually) set the default route.
1. is there a better manual way than adding a
2. is there a way to get dhclient to set the route for me automatically, and ideally tear down the route when tethering is disconnected?
Code:
ipheth0: <Apple Inc. iPhone, class 0/0, rev 2.00/8.02, addr 7> on usbus0
ue0: <USB Ethernet> on ipheth0
ue0: Ethernet address: 82:ed:2c:45:8e:f7
I've been doing the following to set up tethering:
Code:
# pkg install -y usbmuxd libimobiledevice
# usbmuxd -U root -f &
# dhclient ue0
Which works, however I still need to (manually) set the default route.
dhclient ue0
retrieves the following settings from the tethered phone, including the correct route:
Code:
lease {
interface "ue0";
fixed-address 172.20.10.4;
next-server 172.20.10.1;
server-name "dch";
option subnet-mask 255.255.255.240;
option routers 172.20.10.1;
option domain-name-servers 172.20.10.1;
option dhcp-lease-time 85536;
option dhcp-message-type 5;
option dhcp-server-identifier 172.20.10.1;
renew 6 2016/6/4 19:25:54;
rebind 0 2016/6/5 04:20:30;
expire 0 2016/6/5 07:18:42;
}
lease {
interface "ue0";
fixed-address 172.20.10.4;
next-server 172.20.10.1;
server-name "dch";
option subnet-mask 255.255.255.240;
option routers 172.20.10.1;
option domain-name-servers 172.20.10.1;
option dhcp-lease-time 85536;
option dhcp-message-type 5;
option dhcp-server-identifier 172.20.10.1;
renew 1 2016/6/13 22:02:49;
rebind 2 2016/6/14 06:57:25;
expire 2 2016/6/14 09:55:37;
}
1. is there a better manual way than adding a
defaultrouter="172.20.10.1"
info /etc/rc.conf each time and re-running service routing restart
?2. is there a way to get dhclient to set the route for me automatically, and ideally tear down the route when tethering is disconnected?