Дело вот в чем есть три компа дома 1 комп роутер
uname -v
Код: Выделить всё
FreeBSD 7.1-RELEASE-p11 #0: Tue May 25 20:55:35 PETST 2010 astros@router.local.net:/usr/src/sys/i386/compile/ROUTER
uname -a
Код: Выделить всё
Debian, Linux web-server 2.6.26-2-686 #1 SMP Mon Jun 21 05:58:44 UTC 2010 i686 GNU/Linux
rc.conf
Код: Выделить всё
# -- sysinstall generated deltas -- # Wed May 19 05:36:21 2010
# Created: Wed May 19 05:36:21 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
#########################Общие настройки загрузки локализации и т.д###########
moused_enable="YES"
mousechar_start="3"
keyrate="fast"
keymap="ru.koi8-r"
scrnmap="koi8-r2cp866"
font8x16="cp866b-8x16"
font8x14="cp866-8x14"
font8x8="cp866-8x8"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
check_quotas="NO"
##############################################################################
##############################################################################
gateway_enable="YES"
inetd_enable="YES"
linux_enable="YES"
sshd_enable="YES"
##############################################################################
################################network setting###############################
hostname="router.local.net"
network_interface="lo0 re0 re1 re2"
ifconfig_lo="127.0.0.1"
ifconfig_re0="inet 83.xxx.xx.xxx netmask 0xffffffff"
ifconfig_re1="inet 192.168.100.1 netmask 255.255.255.0"
ifconfig_re2="inet 192.168.0.1 netmask 255.255.255.0"
defaulrouter="192.168.0.1"
defaulrouter="192.168.100.1"
##############################################################################
################################start PPPoE###################################
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="PPPoE"
##############################################################################
#########################Включение WebMin#####################################
webmin_enable="YES"
webmin_ipfilter_enable="YES"
##############################################################################
#################################start IPF Filter#############################
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipmon_enable="YES"
ipmon_flags="-Ds"
##############################################################################
################################start IPNAT###################################
ipnat_enable="YES"
ipnat_rules="/etc/ipnat.rules"
##############################################################################
Код: Выделить всё
domain local.net
nameserver 87.xxx.xxx.4
nameserver 87.xxx.xxx.8
Код: Выделить всё
# -- No restrictions on Loopback Interface (1)
pass in quick on lo0 all
pass out quick on lo0 all
# -- No restrictions on Local Interface (2)
pass in quick on re2 all
pass out quick on re2 all
pass in quick on re1 all
pass out quick on re1 all
# -- Let clients behind the firewall send out to the internet, (3)
# -- and replies to come back in by keeping state
pass out quick on tun0 proto tcp all keep state
pass out quick on tun0 proto udp all keep state
pass out quick on tun0 proto icmp all keep state
# -- Let's people access the services running on this system (4)
pass in quick on tun0 proto tcp from any to any port 30000 >< 50000 flags S keep
pass in quick on tun0 proto tcp from any to any port = 21 #FTP
pass in quick on tun0 proto tcp from any to any port = 22 #SSH
pass in log quick on tun0 proto icmp from any to 83.234.14.127/32 icmp-type 8 ke
pass in quick on tun0 proto tcp/udp from any to any port = 53 #DNS
pass in quick on tun0 proto tcp from any to any port = 80
pass in quick on tun0 proto tcp from any to any port = 5190
pass in quick on tun0 proto tcp from 192.168.100.2/32 to any port = 80
pass in quick on tun0 proto tcp from 192.168.100.2/32 to any port = 443
Код: Выделить всё
rdr tun0 83.xxx.xx.xxx/32 port 80 -> 192.168.100.2 port 80
rdr tun0 83.xxx.xx.xxx/32 port 443 -> 192.168.100.2 port 443
map tun0 192.168.0.0/8 -> 0/32 proxy port ftp ftp/tcp
map tun0 192.168.0.0/8 -> 0/32
map tun0 192.168.0.0/8 -> 0/32 portmap tcp/udp 1025:65000
map tun0 192.168.100.0/8 -> 0/32 proxy port ftp ftp/tcp
map tun0 192.168.100.0/8 -> 0/32
map tun0 192.168.100.0/8 -> 0/32 portmap tcp/udp 1025:65000