Linux/Install/Fedora7

  • Search
  • Home
  • All
  • Files
  • History
  • Latest Changes

Linux

  • Apache
  • Install
  • ShellScript
  • Customize
  • fail2ban
  • Gollum
  • HardwareInfo
  • iptables
  • Mail
  • NIC_Bonding
  • OpenVPN
  • phpMyAdmin
  • Redmine
  • Samba
  • SELinux
  • SSH
  • Virtualization
  • VNC

Fedora 7

Table of Contents
  • Fedora 7
    • yumの設定
      • 自動的に近いミラーを参照するようにする
      • パッケージのアップデートと自動更新の設定
    • VNCの設定
    • ファイアウォールの設定

yumの設定

自動的に近いミラーを参照するようにする

yum -y install yum-fastestmirror

パッケージのアップデートと自動更新の設定

/etc/cron.daily/yum.cron

#!/bin/sh
/usr/bin/yum -y update yum > /dev/null 2>&1 ; \
/usr/bin/yum -y update > /dev/null 2>&1

/etc/cron.weekly/yum.cron

#!/bin/sh
/usr/bin/yum -e 0 -d 0 clean packages

VNCの設定

VNC Serverのインストール

yum -y install vnc-server

/etc/services

vnc1024	5901/tcp	# RealVNC 1024x768
vnc1280	5902/tcp	# RealVNC 1280x1024

/etc/xinetd.d/vnc1024

service vnc1024
{
	disable = no
	port = 5901
	socket_type = stream
	wait = no
#	only_from = 192.168.0.0/24
#	no_access = xxx.xxx.xxx.xxx
	user = nobody
	server = /usr/bin/Xvnc
	server_args = -inetd -broadcast -query 127.0.0.1 -once -geometry 1024x768 -dpi 96 -depth 16 -securitytypes=none
	log_on_failure += USERID
}

/etc/xinetd.d/vnc1280

service vnc1280
{
	disable = no
	port = 5902
	socket_type = stream
	wait = no
	only_from = 192.168.0.0/24
#	no_access = xxx.xxx.xxx.xxx
	user = nobody
	server = /usr/bin/Xvnc
	server_args = -inetd -broadcast -query 127.0.0.1 -once -geometry 1280x1024 -dpi 96 -depth 16 -securitytypes=none
	log_on_failure += USERID
}

/etc/gdm/custom.conf

[daemon]
KillInitClients=false
GtkModulesList=
AddGtkModules=false

[xdmcp]
Enable=true

[greeter]
IncludeAll=false
  • Fedora 12で xinetd, VNC, XDMCP (手順編)

ファイアウォールの設定

  • /etc/sysconfig/iptables でrecentを使ってDoS攻撃を防ぐ。(下記はdnsの場合)
    -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -m recent --name DNS --set
    -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -m recent --name DNS --update --rttl --seconds 60 --hitcount 5 -j DROP
    -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
  • iptablesは上から評価されるので、防ぎたいポートの上にrecentを記述する。
  • sshへの総当り攻撃をiptablesの2行で防ぐ方法
  • iptables の ipt_recent で ssh の brute force attack 対策

Home

Last edited by TakeAsh, 2018-08-15 22:14:54