• Skip to main content
  • Skip to primary sidebar

BSDFreaks.nl

For starters and advanced *BSD users

Tags

brand dmi enschede FreeBSD harddisk Hardware Howto's Howto's move new ports server serverruimte universiteit utwente

Rob

[FreeBSD] Security Advisory libkvm

September 17, 2002 by Rob

Er is een security lek gevonden in libkvm.
[quote]
[b]FreeBSD-SA-02:39.libkvm: “Applications using libkvm may leak sensitive descriptors”[/b]

FreeBSD-SA-02:39.libkvm Security Advisory
The FreeBSD Project

Topic: Applications using libkvm may leak sensitive descriptors

Category: core
Module: libkvm
Announced: 2002-09-16
Credits: David Endler ‚

Affects: All releases prior to and including 4.6.2-RELEASE.
Security branch releases prior to 4.4-RELEASE-p27‚
4.5-RELEASE-p20‚ and 4.6.2-RELEASE-p2.
Corrected: 2002-09-13 14:53:43 UTC (RELENG_4)
2002-09-13 15:04:22 UTC (RELENG_4_6)
2002-09-13 15:07:26 UTC (RELENG_4_5)
2002-09-13 15:09:07 UTC (RELENG_4_4)
FreeBSD only: NO

I. Background

The kvm(3) library provides a uniform interface for accessing kernel
virtual memory images‚ including live systems and crash dumps. Access
to live systems is via /dev/ mem and /dev/ kmem. Memory can be read and written‚ kernel symbol addresses can be looked up efficiently‚ and
information about user processes can be gathered.

The kvm_openfiles(3) function opens the special device files /dev/ mem
and /dev/ kmem‚ and returns an opaque handle that must be passed
to the other library functions.

II. Problem Description

Applications that wish to present system information such as swap
utilization‚ virtual memory utilization‚ CPU utilization‚ and
so on may use the kvm(3) library to read kernel memory directly
and gather this information. Such applications typically must
be run set-group-ID kmem so that the call to kvm_openfiles(3)
can access /dev/ mem and /dev/kmem.
If the application then uses exec(2) to start another application‚
the new application will continue to have open file descriptors to
/dev/ mem and /dev/kmem. This is usually avoided by marking file
descriptors as close-on-exec‚ but since the handle returned by
kvm_openfiles(3) is opaque‚ there is no direct way for the application
to determine what file descriptors have been opened by the library.
As a result‚ application writers may neglect to take these file
descriptors into account.

III. Impact

Set-group-ID kmem applications which use kvm(3) and start other
applications may leak /dev/ mem and /dev/kmem file descriptors. If
those applications can be specified by a local user‚ they may be
used to read kernel memory‚ resulting in disclosure of sensitive
information such as file‚ network‚ and tty buffers‚ authentication
tokens‚ and so on.

Several applications in the FreeBSD Ports Collection were identified
that are affected: asmon‚ ascpu‚ bubblemon‚ wmmon‚ and wmnet2. There
may be other applications as well.

IV. Workaround

Remove the set-group-ID bit on affected applications. This will
result in the applications losing some functionality.

V. Solution

Do one of the following:

1) Upgrade your vulnerable system to 4.6-STABLE; or to the RELENG_4_6‚
RELENG_4_5‚ or RELENG_4_4 security branch dated after the correction
date (4.6.2-RELEASE-p2‚ 4.5-RELEASE-p20‚ or 4.4-RELEASE-p27).

2) To patch your present system:

The following patch has been verified to apply to FreeBSD 4.4‚ FreeBSD
4.5‚ FreeBSD 4.6‚ and FreeBSD 4.6.2 systems.

a) Download the relevant patch from the location below‚ and verify the
detached PGP signature using your PGP utility.

# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:39/libkvm.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:39/libkvm.patch.asc

b) Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch # cd /usr/src/lib/libkvm # make depend && make && make install VI. Correction details The following list contains the revision numbers of each file that was corrected in FreeBSD. Path Revision Branch - ------------------------------------------------------------------------- src/lib/libkvm/kvm.c RELENG_4 1.12.2.3 RELENG_4_6 1.12.2.2.8.1 RELENG_4_5 1.12.2.2.6.1 RELENG_4_4 1.12.2.2.4.1 src/sys/conf/newvers.sh RELENG_4_6 1.44.2.23.2.19 RELENG_4_5 1.44.2.20.2.21 RELENG_4_4 1.44.2.17.2.26 - ------------------------------------------------------------------------- [/quote]

Filed Under: *BSD news from the past

NetBSD 1.6 gereleased

September 16, 2002 by Rob

Na een aantal RC’s is hij er dan eindelijk de nieuwe versie van NetBSD.

Hieronder de belangrijkste veranderingen sinds 1.5
[quote]
Major Changes Between 1.5 and 1.6
It is difficult to completely summarize the extensive development between the 1.5 and 1.6 releases. Some highlights include:

Kernel

* Ports to new platforms including: algor‚ dreamcast‚ evbarm‚ hpcarm‚ hpcsh‚ newsmips‚ sandpoint‚ sgimips‚ sun2‚ and walnut.
* Unified Buffer Cache (UBC) removes size restriction of the file system’s buffer cache to use all available RAM (if not otherwise used!) and improves overall system performance.
* Round-robin page colouring implemented for various ports for better cache utilisation‚ more deterministic run-time behaviour‚ and faster program execution.
* A rewritten SCSI middle layer to provide a cleaner interface between the different kernel layers‚ including a kernel thread to handle error recovery outside of the interrupt context. See scsipi(9).
* A new pipe implementation with significantly higher performance due to lower overheads‚ which uses the UVM Page Loan facility.
* Linux binary emulation has been greatly improved with the addition of arm‚ alpha‚ m68k and powerpc support‚ and now supports kernel version 2.4.18.
* Booting from RAIDframe devices is now supported on some ports.
* New boot loader flags -v (bootverbose) and -q (bootquiet)‚ to be used by kernel code to optionally print information during boot.
* An in-kernel boot time device configuration manager userconf(4)‚ activated with the -c boot loader flag.
* A work-in-progress snapshot of ACPI support‚ based on the 20010831 snapshot of the Intel ACPICA reference implementation.
* USB 2.0 support‚ in the form of a preliminary driver for the ehci(4) host controller.
* Basic kernel support for IrDA in the form of the irframe(4) IrDA frame level driver. Serial dongles and the oboe(4) driver are currently supported.
* Kernel configuration files can be embedded into the kernel for later retrieval. Refer to INCLUDE_CONFIG_FILE in options(4) for more information.
* Many more kernel tunable variables added to sysctl(8).

Networking

* Hardware assisted IPv4 TCP and UDP checksumming and caching of the IPv6 TCP pseudo header. Support for checksum offloading on the DP83820 Gigabit Ethernet‚ 3Com 3c90xB‚ 3Com 3c90xC‚ and Alteon Tigon/Tigon2 Gigabit Ethernet cards.
* Zero-Copy for TCP and UDP transmit path achieved through page loaning code for sosend().
* In-kernel ISDN support‚ from the ISDN4BSD project.
* 802.1Q VLAN (virtual LAN) support. See vlan(4).
* IPFilter now supports IPv6 filtering.
* ndbootd(8) added; used to netboot NetBSD/sun2 machines.
* racoon(8) added; IKE key management daemon for IPsec key negotiation‚ from the KAME project.
* WEP encryption supported in ifconfig(8) and awi(4) driver.
* wi(4) and wiconfig(8) now support scanning for access points‚ and defaults to BSS instead of ad-hoc mode.
* Bridging support; currently only for ethernet. See bridge(4).
* In-kernel PPP over Ethernet (PPPoE) – RFC 2516‚ with much lower overhead than user-land PPPoE clients. See pppoe(4).
* ifwatchd(8) added; invokes up-script and down-script when a network interface goes up and down. Used by pppoe(4).

File Systems

* Enhanced stability of LFS version 2‚ the BSD log-structured file system.
* dump(8)‚ dumpfs(8)‚ fsck_ffs(8)‚ fsirand(8)‚ newfs(8)‚ and tunefs(8) support a -F option to manipulate file system images in regular files.
* makefs(8) added; creates file system images from a directory tree. (Currently ffs only.)
* Enhanced ffs_dirpref() by Grigoriy Orlov‚ which noticeably improves performance on FFS file systems when creating directories‚ and subsequently manipulating them.
* Fixes for free block tracking and directory block allocation in FFS softdeps.
* Correctly support FFS file systems with a large number of cylinder groups.
* Fix the endian independant FFS (FFS_EI) support.
* newfs(8) calculates default block size from the file system size‚ and uses the largest possible cylinders/group (cpg) value if -c isn’t given.
* dpti(4) driver added; an implementation of the DPT/Adaptec SCSI/I2O RAID management interface. Allows the use of the Linux versions of dptmgr‚ raidutil‚ dptelog‚ (etc).
* Support for Windows 2000 ‘NTFS’ (NTFS5‚ read-only).
* Tagged queueing support for SCSI drivers based on the ncr53c9x controller.

Security

* Addition of a chroot(8) hierarchy for services including named(8)‚ ntpd(8)‚ and sshd(8).
* Additional passwd(5) ciphers: MD5‚ and DES with more encryption rounds. See passwd.conf(5).
* Several more code audits were performed.
* /etc/security performs many more checks and is far more flexible in how it monitors changes. See security.conf(5).

System administration and user tools

* sushi(8) added; a menu based system administration tool.
* pgrep(1) and pkill(1) added; find or signal processes by name or other attributes.
* System upgrades are made easier through the etcupdate(8) script which helps updating the /etc config files interactively‚ and the /etc/postinstall script which is provided to check for or fix configuration changes that have occurred in NetBSD.
* stat(1) added; a user interface to the information returned by the stat(2) system call.
* BSD sort(1) replaces GNU sort(1).
* The “stop” operation for rc.d(8) scripts waits until the service terminates before returning. This improves the reliability of “restart” operations as well.
* Swap devices can be removed at system shutdown by enabling swapoff in rc.conf(5).
* An optional watchdog timer which will terminate rc.shutdown(8) after the number of seconds provided in rcshutdown_timeout from rc.conf(5).

Miscellaneous

* Support for multibyte LC_CTYPE locales has been integrated from the Citrus project. Many Chinese‚ Japanese‚ Korean‚ and other encodings are now available.
* Full support for cross-compilation of the base system‚ even as a non-root user! src/build.sh is available for doing arbitrary cross-builds; see src/BUILDING for more information. At least 38 ports for the NetBSD 1.6 release were cross-built on a NetBSD/i386 system using this mechanism.
* Migrated the following CPU platforms to ELF: arm‚ and m68k (including amiga‚ hp300‚ mac68k‚ mvme68k‚ sun2‚ and x68k).
* Updates of most third party packages that are shipped in the base system to the following latest stable releases:

– amd 6.0.6 – BIND 8.3.3 – binutils 2.11.2 – bzip2 1.0.2 – cvs 1.11 – dhcp 3.0.1rc9 – file 3.38 – gcc 2.95.3 – groff 1.16.1 – Heimdal 0.4e – IPfilter 3.4.27 – kerberos4 1.1 – ksh from pdksh 5.2.14p2 – less 374 – nvi 1.79 – OpenSSH 3.4 – OpenSSL 0.9.6g – Postfix 1.1.11 – ppp 2.4.0 – routed 2.24 – sendmail 8.11.6 – tcpdump 3.7.1 – XFree86 4.2.0 (i386 only)
* Many new packages in The NetBSD packages collection‚ including the latest open source desktop KDE3‚ OpenOffice.org‚ as well as the latest Perl‚ Apache and many more. At the time of writing‚ there are over 3000 third party packages available in pkgsrc.
* Added AGP GART driver agp(4) for faster access to graphics boards.
* init(8) will create an mfs (memory based file system) /dev if /dev/console is missing.
* vmstat(8) displays kernel hash statistics with -H and -h hash.
* wscons(4) supports blanking of VGA consoles.[/quote]

Filed Under: *BSD news from the past

Overeenstemming over kabel-concurrentie

September 5, 2002 by Rob

Bron: [url=http://www.webwereld.nl]Webwereld[/url]

Kabelbedrijven als UPC en Essent hebben afspraken gemaakt over de openstelling van hun netwerken voor concurrerende internetaanbieders.
De overeenstemming – die behalve voor internet ook gevolgen heeft voor televisie – zou betekenen dat toegang tot de kabel goedkoper wordt voor internetaanbieders. Casema en vooral Essent pleiten al tijden voor concurrentie op de kabel.

[url=http://www.webwereld.nl/nieuws/12372.phtml]Lees het hele artikel[/url]

Filed Under: *BSD news from the past

Anti Trojan kernel patches voor FreeBSD 4.6‚ 4.6.2 en OpenBSD 3.1

September 5, 2002 by Rob

Bron: [url=http://www.trojanproof.org/]Trojanproof.org[/url]

Deze [url=http://www.trojanproof.org]site[/url] bevat een aantal patches voor de FreeBSD 4.6‚ FreeBSD 4.6.2 en de OpenBSD 3.1 kernel. De TrojanXproof Anti-Trojan en de Trojan Detection kernel patch zijn vrij verkrijgbaar‚ ze zijn worden niet officieel ondersteund door FreeBSD of OpenBSD dus let daar op!

Filed Under: *BSD news from the past

BSDFreaks is verhuist!

September 3, 2002 by Rob

Sinds gisteravond zijn we van de webis server verhuist naar de server van [url=http://www.sebatech.net]Sebatech[/url]. Dit brengt met zich mee dat de site een stukje sneller is geworden voor de breedbanders onder ons 🙂
Dank u Sebatech!!

We wensen jullie nog veel *BSD plezier!!

Filed Under: *BSD news from the past

[FreeBSD] Security checklist

September 3, 2002 by Rob

Er is een handige security checklist verschenen voor FreeBSD‚ hiermee kun je nagaan of jouw FreeBSD installatie een beetje veilig is.
[quote]
This document is intended to be a working checklist of security settings implemented on FreeBSD servers.

There is no question that there are a number of well-written and often brilliant documents providing overviews‚ how-to’s and faqs on FreeBSD security for the practical systems administrator‚ but there is no to-the-point‚ checklist that can be a tool for each time a server is built. While there are no elaborate explanations supplied here‚ you can check out the bibliography at the end of this document. Remember‚ nothing upsets your fellow sysadmins more than not RTFM.

It is not intended to be final document‚ but rather a working‚ regularly updated tool‚ complemented with the input of others and myself.

Ideally‚ this document could be accessed over the internet or printed out and used as a reference when building a server.

This checklist is meant to focus on the actual operating system‚ not individual applications. It does not approach important basics such as firewalling with pf‚ ipf and ipfw‚ nor the various mail transfer agents‚ www servers and their configurations.

Finally‚ although I have tried to be as accurate as possible‚ it should be clear that I’m not responsible for any errors you make using this document.
[/quote]
[url=http://sddi.net/FBSDSecCheckList.html]De checklist[/url]

Filed Under: *BSD news from the past

[FreeBSD] Verandering compressie formaat

September 3, 2002 by Rob

Vanaf heden veranderd het standaard compressie formaat van FreeBSD in bzipped tarball‚ dit op verzoek van het release engineers.
Ook de ports collection is veranderd in .tbz
[quote]
Date: Sun‚ 1 Sep 2002 13:15:02 -0700
From: Kris Kennaway
To: stable@FreeBSD.org
Subject: HEADS UP: Package compression format changed

–ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

At the request of the release engineers the default package
compression scheme has been changed from gzipped tarball to bzip2ed
tarball. The package tools have been updated to deal with the new
format (older package tools only had partial support for .tbz
packages).

Additionally‚ the ports collection packages distributed via the FTP
site have been switched to .tbz‚ so if you are a regular user of these
packages you will need to update and rebuild your package tools
(e.g. by doing a complete upgrade).

Kris [/quote]

Filed Under: *BSD news from the past

[NetBSD] Vordering van 1.6

September 3, 2002 by Rob

NetBSD 1.6 is de negende release van NetBSD‚ momenteel zijn ze gevorderd tot Release Candidate 3 (RC3). Als het goed is worden er alleen belangrijke bugfixes gedaan voor de release.
[quote]
NetBSD 1.6 is the ninth major release of the NetBSD operating system‚ and is currently in the pre-release stage. The netbsd-1-6 CVS branch is currently at 1.6_RC3. As this is a release candidate‚ only critical bugs are expected to be fixed before the release. If you’re confident‚ you can build NetBSD from source or use the daily binary snapshots and perform testing on your system(s).

Note: Although the netbsd-1-6 branch is currently very stable‚ it should not be considered to be production quality until the final release. See Personal contributions to NetBSD for information on testing and reporting bugs.[/quote]

Filed Under: *BSD news from the past

[FreeBSD] 4.7 Release info

September 3, 2002 by Rob

De FreeBSD stable branch is bevroren in de voorbereiding op FreeBSD 4.7. Dit zorgt er voor dat wijzigingen in de source tree eerst goedgekeurd dienen te worden door het FreeBSD Release engingeering team.
De verwachte release datum voor 4.7 is 1 oktober 2002.
[url=http://www.freebsd.org/releases/4.7R/schedule.html]Planning voor 4.7[/url]

Filed Under: *BSD news from the past

Router configuratie met IPFilter

September 3, 2002 by Rob

In deze howto gaan we een router op zetten met ipfilter en ipnat‚ dit is het alternatief voor ipfirewall. Welke je kiest is afhankelijk van je keuze’s‚ echter mijn voorkeur gaat uit naar ipfilter‚ daarom ook deze howto.

Het eerste deel is gekoppierd uit
[url=http://www.bsdfreaks.nl/index.php/front_howto/53/100]deze howto[/url]

==========================
Ik ga ervanuit dat je ssh gebruikt mocht je nog met telnet werken zoek dan eerst
een howto om over te stappen naar ssh.

Firewall in de kernel bakken.

[shell]# cp /usr/local/sys/i386/conf/GENERIC /usr/local/sys/i386/conf/FIREWALL[/shell]

Vervolgens edit je de file [i]/usr/local/sys/i386/conf/FIREWALL[/i]
en zet je overal waar GENERIC staat FIREWALL neer.
vervolgens zoek je dit blok op en zorg je dat er het volgende komt te staan.
Uiteraard moet je zelf de goede cpu instellen door de rest af te #-en

[shell]machine i386
#cpu I386_CPU
#cpu I486_CPU
cpu I586_CPU
#cpu I686_CPU
ident FIREWALL
maxusers 32

options MATH_EMULATE #Support for x87 emulation
options INET #InterNETworking
options IPFILTER #enable the filter in
general
options IPFILTER_LOG #logging enabled
#options IPFILTER_DEFAULT_BLOCK #block by default
[/shell]

LET OP dat je een # zet voor de laatste regel !!(in bovestaand stuk)
Anders kun je straks niet meer bij de co-located bak!

vervolgens compileer je de kernel.

[shell]# cd /usr/src
# make clean
# make buildkernel KERNCONF=FIREWALL[/shell]

controleer nu of het bestand /etc/ipf.rules bestaat? deze mag NIET bestaan als
er een staat verwijder deze dan (zorg wel voor een backup)

[shell]# cd /usr/src/
# make installkernel KERNCONF=FIREWALL
[/shell]
==========================
We gaan hier verder met het configureren (dit gedeelte is door mij geschreven)

Edit je /etc/rc.conf en zorg dat hij er ongeveer zo uit komt te zien
[file]ifconfig_ed0=”inet EXTERNE_IP netmask NETMASK”
ifconfig_lnc0=”inet 192.168.1.1 netmask 255.255.255.0″
defaultrouter=”212.204.160.1″
ipfilter_enable=”NO”
ipnat_enable=”YES”
gateway_enable=”YES”[/file]
In dit geval is ed0 mijn netwerk kaart die aan internet hangt en lnc0 degene die mijn interne netwerk verbind met de router. Het belangrijkste is dat je een verbinding hebt met het internet‚ dus de ifconfig instellingen zullen voor iedereen anders zijn.

Nu gaan we de daadwerkelijke router instellen‚ open daarvoor /etc/ipnat.rules en zorg dat hij er zo uit komt te zien:
[file]map ed0 192.168.1.0/24 -> 0/32 proxy port ftp ftp/tcp
map ed0 192.168.1.0/24 -> 0/32 portmap tcp/udp auto
map ed0 192.168.1.0/24 -> 0/32[/file]
ed0 is dus mijn externe netwek kaart‚ mijn intere netwerk is 192.168.1 9 (je kunt hier dus ook ziets hebben als 10.0.0) De eerste regel zorgt ervoor dat ftp ook goed werkt en door “0/32” zorg je ervoor dat de juiste ip wordt gerbuikt (als je bv een dynamisch ip hebt)

Wil je nu een bepaalde poort doorsturen voeg dan de volgende regels toe aan je /etc/ipnat.rules
[file]rdr ed0 0/32 port 6800-6833 -> 192.168.1.2 port 6800 tcp/udp
rdr ed0 0/32 port 81 -> 192.168.1.2 port 80 tcp/udp[/file]
De eerste regel zorgt ervoor dat poorten 6800 t/m 6833 worden doorgestuurd naar 192.168.1.2‚ deze poorten stel je dan bv in bij ICQ en je hebt filetransfer werkend. De tweede regel stuurt poort 81 door naar 192.168.1.2 op poort 80. Je kan dit bv gebruiken om op 192.168.1.2 een webserver te laten draaien en wil dan van buiten je netwerk verbinding maken met de webserver op 192.168.1.2 dan kun je het volgende adres gebruiken http://EXTERNE_IP:81

Reboot nu de machine en kijk of het allemaal werkt
[shell]reboot[/shell]

Als dit werkt kunnen we het wat veiliger maken door een firewall toe te voegen. De werkwijze die ik normaal aan houdt is: eerst alles dicht en dan wat gaatjes in de firewall maken.
Ik gebruik de volgende firewall rules (lees ze nog wel even door en kijk of ze ook voor jouw goed zijn):
Deze zet je in: /etc/ipf.rules
[file]
#################################################################
# Outside Interface
#################################################################
# loopback pakets left unmolested
pass in quick on lo0 all
pass out quick on lo0 all
#—————————————————————-
# Allow out all TCP‚ UDP‚ and ICMP traffic & keep state on it
# so that it’s allowed back in.
#—————————————————————-
pass out quick on ed0 proto tcp from any to any keep state
pass out quick on ed0 proto udp from any to any keep state
pass out quick on ed0 proto icmp from any to any keep state
block out quick on ed0 all

#—————————————————————-
# Allow bootp traffic in from your ISP’s DHCP server only.
# Replace X.X.X.X/32 with your ISP’s DHCP server address.
#—————————————————————-
#pass in quick on ed0 proto udp from 212.120.66.200/32 to any port = 68 keep state
# block incoming/outgoing unroutable addresses on interface ex1
block in quick on ed0 from 192.168.0.0/16 to any
block in quick on ed0 from 172.16.0.0/12 to any
block in quick on ed0 from 127.0.0.0/8 to any
block in quick on ed0 from 10.0.0.0/8 to any
block in quick on ed0 from 169.254.0.0/16 to any
block in quick on ed0 from 192.0.2.0/24 to any
block in quick on ed0 from 204.152.64.0/23 to any
block in quick on ed0 from 224.0.0.0/3 to any
block in quick on ed0 from 255.255.255.255/32 to any
block in quick on ed0 from 0.0.0.0/32 to any
block out quick on ed0 from any to 192.168.0.0/16
block out quick on ed0 from any to 172.16.0.0/12
block out quick on ed0 from any to 127.0.0.0/8
block out quick on ed0 from any to 10.0.0.0/8
block out quick on ed0 from any to 169.254.0.0/16
block out quick on ed0 from any to 192.0.2.0/24
block out quick on ed0 from any to 204.152.64.0/23
block out quick on ed0 from any to 224.0.0.0/3
block out quick on ed0 from any to 255.255.255.255/32
block out quick on ed0 from any to 0.0.0.0/32

# drop any IP packets with options set in them
block in quick all with ipopts
block in quick all with frag
block in quick all with short
block return-rst in quick proto tcp all flags FUP

# This host only runs sshd‚ no other services
pass in quick on ed0 proto tcp from any to any port = 22 flags S keep state

# Apache Webserver
pass in quick proto tcp from any to any port = 80 flags S keep state

# To receive traceroute replies
pass in quick on ed0 proto icmp from any to any icmp-type timex keep state
pass in quick on ed0 proto icmp from any to any icmp-type echorep

# Outbound traffic from our own IPs is allowed
# Could be made more strict for icmp
pass out quick on ed0 proto tcp/udp from EXTERNIP/32 to any
pass out quick on ed0 proto tcp/udp from EXTERNIP/24 to any
pass out quick on ed0 proto icmp from EXTERNIP/32 to any
pass out quick on ed0 proto icmp from 192.168.1.0/24 to any

# Block and log all remaining traffic coming into the firewall
block return-rst in log quick on ed0 proto tcp from any to any
block return-icmp-as-dest(port-unr) in log quick on ed0 proto udp from any to any
block in log quick on ed0 all

#################################################################
# Inside Interface
#################################################################
#—————————————————————-
# Allow out all TCP‚ UDP‚ and ICMP traffic & keep state
#—————————————————————-
pass out quick on lnc0 proto tcp from any to any
pass out quick on lnc0 proto udp from any to any
pass out quick on lnc0 proto icmp from any to any

#—————————————————————-
# Allow in all TCP‚ UDP‚ and ICMP traffic & keep state
#—————————————————————-
pass in quick on lnc0 proto tcp from any to any
pass in quick on lnc0 proto udp from any to any
pass in quick on lnc0 proto icmp from any to any
[/file]

Let er wel op‚ als je poorten door wilt sturen en je gebruikt een firewall dat je die poorten ook open zet in je firewall en niet alleen in je ipnat configuratie.

We kunnen nu de firewall testen door het volgende commando te geven:
[shell] ipf -Fa -f /etc/ipf.rules && sleep 180 && ipf -Fa[/shell]
Je kunt nu 3 minuten testen of alles nog werkt.

Werkt dit goed dan kun je in je /etc/rc.conf de volgende waarde veranderen in:
[file]ipfilter_enable=”YES”[/file]
Bij de volgende reboot wordt alles dan automatisch geladen.

Wat handige commando’s indien je de firewall of ipnat rules wijzigt (hoef je niet te rebooten)
[shell]ipf -Fa -f /etc/ipf.rules[/shell]
Deze regel herlaad je firewall regels

[shell]ipnat -CF -f /etc/ipnat.rules[/shell]
Deze regel herlaad je ipnat rules.

Indien je hiervoor ipfirewall draaide zorg er dan voor dat die niet meer draait.

Veel su6

Filed Under: Firewall

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 62
  • Page 63
  • Page 64
  • Page 65
  • Page 66
  • Interim pages omitted …
  • Page 83
  • Go to Next Page »

Primary Sidebar

Pages

  • Howto overview
  • iPhone mail setup
  • Links

Categories

  • *BSD news from the past
  • Console
  • Firewall
  • FreeBSD
  • FTP server
  • Hardware
  • Howto's
  • Installation
  • Kernel
  • Mail server
  • Miscellaneous
  • Networking
  • News
  • News imported
  • OpenBSD
  • Operating System
  • Programming
  • Security
  • Site news
  • Software
  • Sysutils
  • Web server

Recent Comments

  • admin on Qmail FreeBSD Mail Toaster Spam en virus control addon
  • admin on [FreeBSD] Het opzetten van een Vlan
  • Jap on [FreeBSD] Installing GlFtpd
  • Jap on [FreeBSD] Installing GlFtpd
  • Crashjuh on Wireless access point met OpenBSD + VPN

Copyright © 2025 · Genesis Sample Theme on Genesis Framework · WordPress · Log in