Article View: pl.comp.os.bsd
Article #9076ipf / ipnat / co pierwsze ?
From: G.Maziarek
Date: Sat, 18 Jun 2005 20:04
Date: Sat, 18 Jun 2005 20:04
68 lines
2375 bytes
2375 bytes
Czesc, siec wyglada tak: internet---xl0--freebsd--rl0---siec_lokalna xl0: IP_PUBL rl0: 192.168.1.1 Konfiguracja na kompier wyglada nastepujaco : /etc/rc.conf ifconfig_xl0="DHCP" ifconfig_rl0="inet 192.168.1.1 netmask 255.255.255.0" ipfilter_enable="YES" ipfilter_program="/sbin/ipf" ipfilter_rules="/etc/ipf.rules" ipfilter_flags="" ipnat_enable="YES" ipnat_program="/sbin/ipnat" ipnat_rules="/etc/ipnat.rules" ipnat_flags="" ipmon_enable="YES" ipmon_program="/sbin/ipmon" ipmon_flags="-Ds" gateway_enable="YES" dhcpd_enable="YES" /etc/ipnat.rules map xl0 192.168.1.0/24 -> IP_PUBL/32 portmap tcp/udp 30000:60000 map xl0 192.168.1.0/24 -> IP_PUBL/32 /etc/ipf.rules ( w duzym skr.) pass out quick on lo0 pass in quick on lo0 pass out quick on rl0 pass in quick on rl0 pass out on xl0 pass in on xl0 block in quick on xl0 from WSZYTKIE_KLASY_IP_LOKA to any pass out quick on xl0 proto tcp/udp from IP_PUBL/32 to any keep state pass out quick on xl0 proto icmp from IP_PUBL/32 to any keep state *1* block out log quick on xl0 block in log quick on xl0 przy takim ustawieniu z internetu mozna ko. tylko z freebsd a z sieci lokalnej nie mozna, musze dodac w firewall (w moejscu *1*) aby zacze. dzialac: pass out quick on xl0 proto tcp/udp from 192.168.1.0/24 to any keep state pass out quick on xl0 proto icmp from 192.168.1.0/24 to any keep state Dlaczego tak jest ? przeciez siec lokalna 192.168.1.0/24 jest na rl0 a nie na xl0. Raczej do xl0 powinny docierac adresy IP po natowaniu z IP publi. Albo cos mam zle skonf. albo cos nie doczytalem Pozdrawiam -- GM
Technical Details
Message-ID:
<d91uod$hbq$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: "G.Maziarek" <gmaziarek@gazeta.pl> Newsgroups: pl.comp.os.bsd Subject: ipf / ipnat / co pierwsze ? Date: Sat, 18 Jun 2005 21:04:37 +0100 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 74 Message-ID: <d91uod$hbq$1@inews.gazeta.pl> Reply-To: gmaziarek@gazeta.pl NNTP-Posting-Host: cpc2-pete2-3-0-cust151.pete.cable.ntl.com Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1119125069 17786 81.105.69.151 (18 Jun 2005 20:04:29 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Sat, 18 Jun 2005 20:04:29 +0000 (UTC) X-User: gmaziarek User-Agent: KNode/0.8.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit