PCルータ
よく分かってないです。ごめんなさい。
以下
| ルータグローバルIP | 172.16.0.1 |
|---|---|
| ルータプライベートIP | 192.168.0.1 |
| DNS | 192.168.0.2 |
| Web | 192.168.0.3 |
と仮定。
IPフォワード
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
/sbin/sysctl -p
確認
cat /proc/sys/net/ipv4/ip_forward
iptables
vi masq.sh
|
chmod a+x ./masq.sh ./masq.sh
DHCP
apt-get install dhcp cp /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /etc/dhcpd.conf
vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
# option nis-domain "domain.org";
# option domain-name "domain.org";
option domain-name-servers 192.168.0.2;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 172.16.0.1;
# option netbios-name-servers 172.16.0.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.100 192.168.0.200;
default-lease-time 21600;
max-lease-time 43200;eth0を外、eth1を内にしたい鬼っ子は
vi /etc/sysconfig/dhcpd
# Command line options here DHCPDARGS=eth1
セキュリティ
Linux/Rootkit Hunterを入れたりして対策したつもりになる。
参考
- Linuxで作るファイアウォール[準備編](1/2)
- 自宅サーバー セキュリティの第一歩
- iptables
- PortScan診断
- (special2)iptablesでいこう(1. ステルスと戦え)
- Stray Penguin - Linux Memo (iptables)


