Вся система настраивалась по докам с вашего сайта, конфиг для файрвола был взят первый...
В rc.conf:
Код: Выделить всё
gateway_enable="YES"
ifconfig_xl0="inet 192.168.0.200 netmask 255.255.255.0"
firewall_enable="YES"
firewall_type="/etc/rc.firewall"
firewall_logging="YES"
nat_enable="YES"
natd_interface="ppp0"
natd_flags="-m -u"
clamav_clamd_enable="YES"
sshd_enable="YES"
inetd_enable="YES"
named_flags="-u bind"
nisdomainname="NO"
mysql_enable="YES"
squid_enable="YES"
Код: Выделить всё
00100 0 0 check-state
00200 224 14520 allow ip from any to any via lo0
# Это для сквида, который ломится к c-icap
00300 32 1920 allow tcp from 127.0.0.1 to 217.195.64.xxx out via ppp0
00400 0 0 deny log logamount 100 ip from any to 127.0.0.0/8
00500 0 0 deny log logamount 100 ip from 127.0.0.0/8 to any
00600 0 0 deny ip from any to 10.0.0.0/8 in via ppp0
00700 0 0 deny ip from any to 172.16.0.0/12 in via ppp0
00800 0 0 deny ip from any to 192.168.0.0/16 in via ppp0
00900 0 0 deny ip from any to 0.0.0.0/8 in via ppp0
01000 0 0 deny ip from any to 169.254.0.0/16 in via ppp0
01100 0 0 deny ip from any to 224.0.0.0/4 in via ppp0
01200 0 0 deny ip from any to 240.0.0.0/4 in via ppp0
01300 0 0 deny icmp from any to any frag
01400 0 0 deny log logamount 100 icmp from any to 255.255.255.255 in via ppp0
01500 0 0 deny log logamount 100 icmp from any to 255.255.255.255 out via ppp0
01600 28 2778 fwd 127.0.0.1,3128 tcp from 192.168.0.0/24 to any dst-port 80 via ppp0
01700 305 21604 divert 8668 ip from 192.168.0.0/24 to any out via ppp0
01800 21 3478 divert 8668 ip from any to 217.195.64.xxx in via ppp0
01900 0 0 deny ip from 10.0.0.0/8 to any out via ppp0
02000 0 0 deny ip from 172.16.0.0/12 to any out via ppp0
02100 0 0 deny ip from 192.168.0.0/16 to any out via ppp0
02200 0 0 deny ip from 0.0.0.0/8 to any out via ppp0
02300 0 0 deny ip from 169.254.0.0/16 to any out via ppp0
02400 0 0 deny ip from 224.0.0.0/4 to any out via ppp0
02500 0 0 deny ip from 240.0.0.0/4 to any out via ppp0
02600 361 47971 allow tcp from any to any established
02700 13 930 allow ip from 217.195.64.xxx to any out xmit ppp0
02800 0 0 allow udp from any 53 to any via ppp0
02900 0 0 allow udp from any 53 to any via xl0
03000 0 0 allow udp from any to any dst-port 123 via ppp0
03100 43 3464 allow icmp from any to any icmptypes 0,8,11
03200 0 0 allow tcp from any to 217.195.64.xxx dst-port 80 via ppp0
03300 0 0 allow tcp from any to 217.195.64.xxx dst-port 25 via ppp0
03400 0 0 allow tcp from any to 192.168.0.200 dst-port 25 via xl0
03500 1 48 allow tcp from any to 192.168.0.200 dst-port 22 via xl0
03600 174 8352 allow tcp from any to any via xl0
03700 3886 351891 allow udp from any to any via xl0
03800 33 1848 allow icmp from any to any via xl0
03900 0 0 deny ip from any to any
65535 0 0 deny ip from any to any
asu-002# ping 194.67.57.26
Код: Выделить всё
PING 194.67.57.26 (194.67.57.26): 56 data bytes
^C
--- 194.67.57.26 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
Вот конфигурация ядра:
Код: Выделить всё
machine i386
cpu I686_CPU
ident main_kernel
# To statically compile in device wiring instead of /boot/device.hints
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_FORWARD
options IPDIVERT
options DUMMYNET
options TCP_DROP_SYNFIN
options SCHED_4BSD # 4BSD scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options MD_ROOT # MD is a potential root device
options CD9660 # ISO 9660 Filesystem
options PROCFS # Process filesystem (requires PSEUDOFS)
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_GPT # GUID Partition Tables.
options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options ADAPTIVE_GIANT # Giant mutex is adaptive.
device apic # I/O APIC
# Bus support.
device isa
device pci
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device atapicd # ATAPI CDROM drives
options ATA_STATIC_ID # Static device numbering
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard
device psm # PS/2 mouse
device vga # VGA video card driver
device splash # Splash screen and screen saver support
# syscons is the default console driver, resembling an SCO console
device sc
device agp # support several AGP chipsets
# Add suspend/resume support for the i8254.
device pmtimer
# Serial (COM) ports
device sio # 8250, 16[45]50 based serial ports
# PCI Ethernet NICs.
device em # Intel PRO/1000 adapter Gigabit Ethernet Card
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
device wb # Winbond W89C840F
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'')
# ISA devices that use the old ISA shims
#device le
# Pseudo devices.
device loop # Network loopback
device random # Entropy device
device ether # Ethernet support
device sl # Kernel SLIP
device ppp # Kernel PPP
device tun # Packet tunnel.
device pty # Pseudo-ttys (telnet etc)
device gif # IPv6 and IPv4 tunneling
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter