Linux (X86) 자료실 - 포기하지 않으면 실패하지 않는다!
Vote Modify Delete Forward Prev Next List

  작성자   : 조성환 (istims@hanmail.net) 추천: 1658, 조회: 4327, 줄수: 135, 분류: Etc.
rc.local Editing (운영체제만으로 프록시 세팅)

************************************
[  vi /etc/rc.d/rc.local  Editing  ]
************************************


[doowon]


#!/bin/sh
#
#
# IP Masquerading
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -F
ipchains -P forward DENY
ipchains -A forward -j MASQ -s 192.168.10.0/24 -d 0.0.0.0/0

/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT


/sbin/modprobe ip_masq_ftp





[1]

#!/bin/sh
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
/sbin/ipchains -A forward -j DENY -s 192.168.2.0/24 -d 192.168.1.0/24
/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0/0
/sbin/ipchains -A forward -j MASQ -s 192.168.2.0/24 -d 0/0


[2]

#!/bin/sh
#
#
# IP Masquerading
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -F
ipchains -P forward DENY
ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0


[3]

depmod -a
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_raudio
/sbin/modprobe ip_masq_irc
/sbin/modprobe ip_masq_vdolive
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/ipfwadm -M -s 7200 10 160
/sbin/ipfwadm -F -p deny
/sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
ipfwadm -F -p masquerade



[4]

Kwsys Setting............
-------------------------

###
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0/0
###
ipchains -A output -p tcp -s 0.0.0.0/0 telnet -t 0x01 0x10
ipchains -A output -p tcp -s 0.0.0.0/0 ftp -t 0x01 0x10
ipchains -A output -p tcp -d 0.0.0.0/0 ftp-data -t 0x01 0x08
###
/sbin/depmod -a
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_irc
/sbin/modprobe ip_masq_raudio
/sbin/modprobe ip_masq_vdolive
###
echo "1" > /proc/sys/net/ipv4/ip_forward
###
#/sbin/ipfwadm -M -s 7200 10 160
#/sbin/ipfwadm -F -p deny
#/sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
#ipfwadm -F -p masquerade



[5]

Sacheon Setting .....
-----------------------
#!/bin/sh
/usr/sbin/squid -z
/usr/sbin/squid -sY
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
/sbin/ipchains -A forward -j DENY -s 192.168.2.0/24 -d 192.168.1.0/24
/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0/0
/sbin/ipchains -A forward -j MASQ -s 192.168.2.0/24 -d 0/0
modprobe ip_masq_ftp


[6]

#!/bin/sh
modprobe ip_masq_ftp
modprobe ip_masq_raudio
modprobe ip_masq_vdolive
ipchains -P forward DENY
/usr/sbin/ipmasqadm autofw -A -v -u -r udp 51200 51201 -c tcp 7175
/usr/sbin/ipmasqadm autofw -A -v -u -r tcp 51210 51210 -c tcp 7175
# eth1 for Masquerading.
ipchains -A forward -j MASQ -s 192.168.1.0/255.255.255.0 -d 0.0.0.0/0
ipchains -A input -j REDIRECT 8080 -p tcp -s 192.168.1.0/255.255.255.0 -d 0.0.0.0/0 80
# eth2 for Masquerading.
ipchains -A forward -j MASQ -s 192.168.2.0/255.255.255.0 -d 0.0.0.0/0
ipchains -A input -j REDIRECT 8080 -p tcp -s 192.168.2.0/255.255.255.0 -d 0.0.0.0/0 80
/sbin/ipchains-restore < /home/httpd/cgi-bin/sysadmin/ipchains_set
/etc/rc.d/rc.portfw




이전: IPCHAINS - HOWTO
다음: Samsung SmartEther NIC SC1200A-TX - Linux 에서 사용하기
2003/04/10(20:10) from 211.211.26.254
CrazyWWWBoard 2000

Vote Modify Delete Forward Prev Next List
(c) Nobreak Technologies, Inc.