{"id":5812,"date":"2020-09-01T22:49:00","date_gmt":"2020-09-01T13:49:00","guid":{"rendered":"http:\/\/hack.gpl.jp\/?p=5812"},"modified":"2020-09-01T22:49:00","modified_gmt":"2020-09-01T13:49:00","slug":"post-5812","status":"publish","type":"post","link":"https:\/\/hack.gpl.jp\/2020\/09\/01\/post-5812.html","title":{"rendered":"\u5099\u5fd8\u9332\uff1amacos\u306e\u9759\u7684\u30eb\u30fc\u30c8\u306e\u8ffd\u52a0"},"content":{"rendered":"
\u3044\u3064\u3082\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3002Linux\u3068\u306f\u3001\u5c11\u3057\u9055\u3044\u6c38\u7d9a\u7684\u306a\u8a2d\u5b9a\u65b9\u6cd5\u306f\u5c02\u7528\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002networksetup \u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n
$ networksetup -listallnetworkservices\nAn asterisk (*) denotes that a network service is disabled.\nBuilt-in Serial Port (1)\nEthernet\niPhone USB\nWi-Fi\nBluetooth PAN<\/pre>\n\u30fb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u306e\u60c5\u5831<\/h4>\n
$ networksetup -getinfo Ethernet\nDHCP Configuration\nIP address: 192.168.1.26\nSubnet mask: 255.255.255.0\nRouter: 192.168.1.1\nClient ID: \nIPv6: Automatic\nIPv6 IP address: none\nIPv6 Router: none\nEthernet Address: 90:2b:34:d0:02:80<\/pre>\n\u30fb\u9759\u7684\u7d4c\u8def\u306e\u8ffd\u52a0\u3068\u524a\u9664<\/h4>\n
\u6c38\u7d9a\u7684\u306b\u8ffd\u52a0\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001124.41.83.243\/32 \u3042\u3066\u306f\u3001192.168.1.38 \u3078\u9001\u308a\u307e\u3059\u3002<\/p>\n
$ sudo networksetup -setadditionalroutes Ethernet 124.41.83.243 255.255.255.255 192.168.1.38<\/pre>\n\u524a\u9664\u3002\u4f55\u3082\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u6d88\u3048\u307e\u3059\u3002<\/p>\n
$ sudo networksetup -setadditionalroutes Ethernet\nThere are no additional IPv4 routes on Ethernet.<\/pre>\n\u518d\u8d77\u52d5\u3059\u308b\u3068\u6d88\u3048\u307e\u3059\u304c\u4e00\u6642\u7684\u306b\u8a2d\u5b9a\u3057\u305f\u3044\u5834\u5408<\/p>\n
sudo route -n add 124.41.83.243\/32 192.168.1.38<\/pre>\n\u524a\u9664\u306f<\/p>\n
sudo route -n delete 124.41.83.243\/32<\/pre>\n\u30fb\u78ba\u8a8d<\/h4>\n
$ networksetup -getadditionalroutes Ethernet\n124.41.83.243 255.255.255.255 192.168.1.38<\/pre>\n\u307e\u305f\u306f\u3001<\/p>\n
$ netstat -rn\nRouting tables\n\nInternet:\nDestination Gateway Flags Refs Use Netif Expire\ndefault 192.168.1.1 UGSc 67 5 en0\n124.41.83.243 192.168.1.38 UGHS 0 0 en0\n::<\/pre>\n","protected":false},"excerpt":{"rendered":"\u3044\u3064\u3082\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3002Linux\u3068\u306f\u3001\u5c11\u3057\u9055\u3044\u6c38\u7d9a\u7684\u306a\u8a2d\u5b9a\u65b9\u6cd5\u306f\u5c02\u7528\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002networksetup \u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002 \u30fb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u540d\u306e\u4e00\u89a7 $ networksetup -li […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"categories":[14,62],"tags":[],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"JunkHack","author_link":"https:\/\/hack.gpl.jp\/author\/junkhack\/"},"uagb_comment_info":0,"uagb_excerpt":"\u3044\u3064\u3082\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30e1\u30e2\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3002Linux\u3068\u306f\u3001\u5c11\u3057\u9055\u3044\u6c38\u7d9a\u7684\u306a\u8a2d\u5b9a\u65b9\u6cd5\u306f\u5c02\u7528\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002…","_links":{"self":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/5812"}],"collection":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/comments?post=5812"}],"version-history":[{"count":0,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/posts\/5812\/revisions"}],"wp:attachment":[{"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/media?parent=5812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/categories?post=5812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.gpl.jp\/wp-json\/wp\/v2\/tags?post=5812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}