{"id":388,"date":"2007-03-31T00:40:23","date_gmt":"2007-03-30T15:40:23","guid":{"rendered":"http:\/\/ecpplus.net\/weblog\/20070331004023"},"modified":"2020-05-24T23:23:04","modified_gmt":"2020-05-24T14:23:04","slug":"debian-sarge%e3%83%ab%e3%83%bc%e3%82%bf%e5%8c%96%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/debian-sarge%e3%83%ab%e3%83%bc%e3%82%bf%e5%8c%96%e3%83%a1%e3%83%a2\/","title":{"rendered":"Debian Sarge\u30eb\u30fc\u30bf\u5316\u30e1\u30e2"},"content":{"rendered":"<p>\u3000\u4eca\u4f7f\u3063\u3066\u308b\u30eb\u30fc\u30bf\u306f\u30014\u3064\u3057\u304bLAN\u30dd\u30fc\u30c8\u306a\u304f\u3066\u8272\u3005\u4e0d\u4fbf\u3060\u3063\u305f\u306e\u3067\u3001Debian\u3092\u30eb\u30fc\u30bf\u306b\u3057\u306616\u30dd\u30fc\u30c8HUB\u3092\u4f7f\u3063\u3066\u300115\u53f0\u307e\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d44\u3081\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u307e\u305a\u3001interfaces \u306e\u8a2d\u5b9a\u3002 \/etc\/network\/interfaces \u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3002eth1_rename \u304c\u5916\u306e\u4e16\u754c\u3068\u3064\u306a\u304c\u3063\u3066\u308bNIC\u3067\u3001eth0\u304c\u5bb6\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eHUB\u3068\u3064\u306a\u304c\u3063\u3066\u308bNIC\u3002<\/p>\n<p><strong>\/etc\/network\/interfaces<\/strong><\/p>\n<pre>auto eth1_rename\niface eth1_rename inet dhcp\n\nauto eth0\niface eth0 inet static\n address 192.168.1.1\n netmask 255.255.255.0\n broadcast 192.168.1.255\n network 192.168.1.0<\/pre>\n<p>\u3000\u3068\u308a\u3042\u3048\u305a\u3001\u8a2d\u5b9a\u304c\u9593\u9055\u3063\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3002<\/p>\n<pre>\/etc\/init.d\/networking restart<\/pre>\n<p>\u3000\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u304b\u3063\u305f\u3089\u3001ifconfig \u3067\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3001\u5408\u3063\u3066\u305d\u3046\u3060\u3063\u305f\u3089\u6b21\u3078\u9032\u3080\u3002<\/p>\n<p>\u3000\u6b21\u306f\u3001DHCP\u30b5\u30fc\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002apt-get\u3067\u5165\u308c\u305f\u3002<\/p>\n<pre>sudo apt-get install dhcp<\/pre>\n<p>\u3000\u6b21\u306b\u3001DHCP\u306e\u8a2d\u5b9a\u3092\u3044\u3058\u308b\u3002 \/etc\/dhcpd.conf \u304c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3069\u3001\u6016\u3044\u306e\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u3063\u3066\u304b\u3089\u7de8\u96c6\u3002\u3068\u308a\u3042\u3048\u305a\u3001\u4ee5\u4e0b\u306e\u69d8\u306b\u3057\u3066\u307f\u305f\u3002<\/p>\n<p><strong>\/etc\/dhcpd.conf<\/strong><\/p>\n<pre> option domain-name-servers xxx.xxx.xxx.xxx;\n\n option subnet-mask 255.255.255.0;\n default-lease-time 600;\n max-lease-time 7200;\n option routers 192.168.1.1;\n\n subnet 192.168.1.0 netmask 255.255.255.0 {\n   range 192.168.1.50 192.168.1.100;\n }<\/pre>\n<dl>\n<dt>option subnet-mask<\/dt>\n<dd>\u30b5\u30d6\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3002\u3053\u308c\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/dd>\n<dt>option routers<\/dt>\n<dd>\u591a\u5206\u3001DHCP\u304c\u305f\u3063\u3066\u308bNIC\u306eIP\u306a\u3093\u3060\u3068\u601d\u3046\u3002\u81ea\u4fe1\u306a\u3044\u304a\u3002<\/dd>\n<dt>subnet &#8230;<\/dt>\n<dd>\u3069\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306eDHCP\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u304b\u3063\u3066\u3053\u3068\u3060\u3068\u601d\u3046\u3002<\/dd>\n<dt>range<\/dt>\n<dd>\u3053\u3053\u3067\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u306eIP\u304cDHCP\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5272\u308a\u632f\u3089\u308c\u308b\u3088\u3046\u3060\u3002<\/dd>\n<\/dl>\n<p>\u3000\u3053\u3053\u307e\u3067\u8a2d\u5b9a\u3059\u308c\u3070DHCP\u30b5\u30fc\u30d0\u306f\u305f\u3064\u3051\u308c\u3069\u3001\u5916\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u306f\u3064\u306a\u304c\u3089\u306a\u3044\u3002eth1_rename \u306b\u304d\u305f\u3082\u306e\u3092eth0 \u306b\u6d41\u3057\u3066\u3042\u3052\u308b\u69d8\u306b\u3001 ip_forward \u3092\u6709\u52b9\u306b\u3059\u308b\u3002\u521d\u671f\u3067\u306f\u591a\u5206\u7121\u52b9\u306b\u306a\u3063\u3066\u308b\u3068\u601d\u3046\u3002<\/p>\n<pre>cat 1 > \/proc\/sys\/net\/ipv4\/ip_forward<\/pre>\n<p>\u3000\u6b21\u306b\u3001ip_tables \u3067\u6d41\u3059\u30eb\u30fc\u30eb\u3092\u6c7a\u3081\u308b\u3002<\/p>\n<pre>sudo iptables -t nat -A POSTROUTING -s 192.168.1.0\/24 -o eth1_rename -j MASQUERADE<\/pre>\n<p>\u3000\u3053\u308c\u3067\u3001eth0_rename \u3067\u53d7\u3051\u305f\u30d1\u30b1\u30c3\u30c8\u3092\u5168\u90e8\u4e2d\u306b\u6d41\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n<p>\u3000\u3053\u3053\u307e\u3067\u3067\u3001\u30eb\u30fc\u30bf\u5316\u306f\u6210\u529f\u3057\u305f\u306f\u305a\u3002\u3042\u3068\u306f\u9759\u7684\u306bIP\u3092\u5272\u308a\u5f53\u3066\u3001\u30d1\u30b1\u30c3\u30c8\u3092\u30eb\u30fc\u30bf\u3067\u3061\u3083\u3093\u3068\u906e\u65ad\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308c\u3070\u7a3c\u50cd\u3067\u304d\u308b\u304b\u306a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u4eca\u4f7f\u3063\u3066\u308b\u30eb\u30fc\u30bf\u306f\u30014\u3064\u3057\u304bLAN\u30dd\u30fc\u30c8\u306a\u304f\u3066\u8272\u3005\u4e0d\u4fbf\u3060\u3063\u305f\u306e\u3067\u3001Debian\u3092\u30eb\u30fc\u30bf\u306b\u3057\u306616\u30dd\u30fc\u30c8HUB\u3092\u4f7f\u3063\u3066\u300115\u53f0\u307e\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d44\u3081\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u307e\u305a\u3001interfaces \u306e\u8a2d\u5b9a\u3002 \/etc\/networ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[7],"class_list":["post-388","post","type-post","status-publish","format-standard","hentry","category-development","tag-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=388"}],"version-history":[{"count":1,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/388\/revisions"}],"predecessor-version":[{"id":2263,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/388\/revisions\/2263"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}