Linux за българи: Форуми

Linux секция за начинаещи => Настройка на програми => Темата е започната от: demolution в Apr 08, 2005, 17:07



Титла: предложения за firewall
Публикувано от: demolution в Apr 08, 2005, 17:07
Здравейте.От скоро сам си поставил Слакуер10 който е и рутер за няколко комп с Уиндоус.Прочетох доста из форумите(има доста информация за firewall-и,но и доста противоречива),в резултат на това аз каточели повече се обьрках отколкото да стигна да извода как да си изградя подходящ firewall.Ако някой може да ми помогне или направо да ми каже откьде мога да си download-на подхящ скрипт или пак как най-лесно да защитя компютрите зад рутера(само да не ме кара да изключа кабела или направо PCтата)ще му бьда адски благодарен за помоща.Хайда сьс здраве,чао.


Титла: предложения за firewall
Публикувано от: sys7em в Apr 08, 2005, 17:23
iptables
http://www.tldp.org/HOWTO/Masquerading-Simple-HOWTO/index.html


Титла: предложения за firewall
Публикувано от: v_badev в Apr 08, 2005, 17:39
И нещо по темата на български - Как да направим пакетен филтър с Линукс 2.4


Титла: предложения за firewall
Публикувано от: lamby в Apr 08, 2005, 23:21
Frozentux  
Има и готови примери


Титла: предложения за firewall
Публикувано от: Bogo в Apr 08, 2005, 23:40
Свърши работа с това пък после си го разучавай :)


Титла: предложения за firewall
Публикувано от: demolution в Apr 09, 2005, 12:30
А какво да направя по-точно с фаила които сам генерирал.Как да стартирам скрипта?


Титла: предложения за firewall
Публикувано от: spawnman в Apr 09, 2005, 13:31
Ми като си го генерирал да беше прочел поне малко от началото на файла!
Цитат
#!/bin/sh
#
# Generated iptables firewall script for the Linux 2.4 kernel
# Script generated by Easy Firewall Generator for IPTables 1.15
# copyright 2002 Timothy Scott Morizot
#
# Redhat chkconfig comments - firewall applied early,
#                             removed late
# chkconfig: 2345 08 92
# description: This script applies or removes iptables firewall rules
#
# This generator is primarily designed for RedHat installations,
# although it should be adaptable for others.
#
# It can be executed with the typical start and stop arguments.
# If used with stop, it will stop after flushing the firewall.
# The save and restore arguments will save or restore the rules
# from the /etc/sysconfig/iptables file.  The save and restore
# arguments are included to preserve compatibility with
# Redhat's init.d script (at least in 7.x) if you prefer to use it.

# Redhat installation instructions
#
# 1. Ensure that ipchains will not automatically start.
#    chkconfig --level 0123456 ipchains off
#    This will make sure that the ipchains init.d script
#    is not linked to an S file in any of the rc directories.
#
# 2. Stop ipchains if it's running.
#    service ipchains stop
#
# 3. Execute lsmod to see if the ipchains kernel module is still loaded.
#    If it is, use rmmod to unload it. -- rmmod ipchains
#
# 4. Have the system link the iptables init.d startup script into run states
#    2, 3, and 5.
#    chkconfig --level 235 iptables on
#
# 5. Save this script and execute it to load the ruleset from this file.
#    You may need to run the dos2unix command on it to remove carraige returns.
#
# 6. To have it applied at startup, copy this script to
#    /etc/init.d/iptables.  It accepts stop, start, save, and restore
#    arguments.  (You may wish to save the existing one first.)
#
# 7. For non-Redhat systems (or Redhat systems if you have a problem), you
#    may want to append the command to execute this script to rc.local.
#    rc.local is typically located in /etc and /etc/rc.d and is usually
#    the last thing executed on startup.  Simply add /path/to/script/script_name
#    on its own line in the rc.local file.

"Четай demolution, четай чедо!" :D
Have fun!


Титла: предложения за firewall
Публикувано от: demolution в Apr 09, 2005, 16:51
Прочетох го,и то няколко пьти,но не успях да го разбера.Тьй като конфигурацията ми не е базирана на Rad Hat,предполагам че за мен важи "7".Това което направих е да поставя сьдьржанието на генерирания скрипт в /еtc/rc.d/rc.local.Предположих,че след рестарт ще подейства на но не се получи.Предполагам че аз нещо не сам разбрал,кажете ми кьде греша.


Титла: предложения за firewall
Публикувано от: Bogo в Apr 09, 2005, 18:31
chmod 744 firewall.script
./firewall.script
в секцията postrouting chain си добави само правилата за маскиране
при мене е така:
###############################################################################
#
# POSTROUTING chain
#

$IPT -t nat -A POSTROUTING -s 192.168.124.2 -j MASQUERADE
$IPT -t nat -A POSTROUTING -s 192.168.124.10 -j MASQUERADE
$IPT -t nat -A POSTROUTING -s 192.168.124.20 -j MASQUERADE