Moje konfiguraky
Pentium
pentium.konference at seznam.cz
Thu Nov 21 21:54:19 CET 2002
Posilam tomu kdo mi chce pomoc sve konfiguraky. Stale jsem nevyresil
sdileni toho pripojeni podle netstatu jsem zjistil ze Sitovka by mela
bejt ep0 a modem zrejme ppp0 jelikoz mam externi modem pripojenej na
com 2
192.168.1.1 je server etmaska 255.255.255.0 je moje sit.
195.146.100.5 a 195.146.100.100 je DNS tiscali
je router tiscali
ip je ruzna pri kazdem pripojeni
Co nevim ? jak konfigurovat DNS jedna se mi o to aby martin nemel 1.99
ale treba 1.50 a nekdo zde rikal ze pro klienty s win98 musi byt zapnut
dhcp a tam
napsano jakej klient jaka ip pokud jsem to zmenil v dhcp.leas tak to
nemelo zadny efekt.
------------------------------------------------------------------------
------
Konfiguraky
rc.conf
# -- sysinstall generated deltas -- # Sun Nov 10 17:46:58 2002
# Created: Sun Nov 10 17:46:58 2002
# 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.
hostname="server.martin-network.cz"
gateway__enable="YES"
firewall_enable="NO"
firewall_script="/etc/rc.ipfw"
firewall_type="open"
firewall_quiet="NO"
natd_progam="/sbin/natd"
natd_=enable"YES"
natd_interface="ep0"
natd_flags="-f /etc/natd.conf"
tcp_drop_synfin="YES"
ifconfig_ep0="inet 192.168.1.1 netmask 255.255.255.0"
ipv6_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
nfs_reserved_port_only="YES"
sendmail_enable="YES"
sshd_enable="YES"
# -- sysinstall generated deltas -- # Sun Nov 10 18:15:39 2002
ifconfig_ep0="inet 192.168.1.1 netmask 255.255.255.0"
kern_securelevel_enable="NO"
sendmail_enable="YES"
moused_enable="YES"
sshd_enable="YES"
nfs_reserved_port_only="YES"
hostname="server.martin-network.cz"
rc.ipfw
# Copyright (c) 1996 Poul-Henning Kamp
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above
copyright
# notice, this list of conditions and the following disclaimer in
the
# documentation and/or other materials provided with the
distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF
# SUCH DAMAGE.
#
# $FreeBSD: src/etc/rc.firewall,v 1.30.2.15 2002/02/28 14:51:42 cjc
Exp $
#
#
# Setup system for firewall service.
#
# Suck in the configuration variables.
if [ -z "" ]; then
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
fi
############
# Define the firewall type in /etc/rc.conf. Valid values are:
# open - will allow anyone in
# client - will try to protect just this machine
# simple - will try to protect a whole network
# closed - totally disables IP services except via lo0 interface
# UNKNOWN - disables the loading of firewall rules.
# filename - will load the rules in the given filename (full path
required)
#
# For ``client'' and ``simple'' the entries below should be
customized
# appropriately.
############
#
# If you don't know enough about packet filtering, we suggest that
you
# take time to read this book:
#
# Building Internet Firewalls, 2nd Edition
# Brent Chapman and Elizabeth Zwicky
#
# O'Reilly & Associates, Inc
# ISBN 1-56592-871-7
# http://www.ora.com/
# http://www.oreilly.com/catalog/fire2/
#
# For a more advanced treatment of Internet Security read:
#
# Firewalls & Internet Security
# Repelling the wily hacker
# William R. Cheswick, Steven M. Bellowin
#
# Addison-Wesley
# ISBN 0-201-63357-4
# http://www.awl.com/
# http://www.awlonline.com/product/0%2C2627%2C0201633574%2C00.html
#
setup_loopback () {
############
# Only in rare cases do you want to change these rules
#
add 100 pass all from any to any via lo0
add 200 deny all from any to 127.0.0.0/8
add 300 deny ip from 127.0.0.0/8 to any
}
if [ -n "" ]; then
firewall_type=""
fi
############
# Set quiet mode if requested
#
case in
[Yy][Ee][Ss])
fwcmd="/sbin/ipfw -q"
;;
*)
fwcmd="/sbin/ipfw"
;;
esac
############
# Flush out the list before we begin.
#
-f flush
############
# Network Address Translation. All packets are passed to natd(8)
# before they encounter your remaining rules. The firewall rules
# will then be run again on each packet after translation by natd
# starting at the rule number following the divert rule.
#
# For ``simple'' firewall type the divert rule should be put to a
# different place to not interfere with address-checking rules.
#
case in
[Oo][Pp][Ee][Nn]|[Cc][Ll][Ii][Ee][Nn][Tt])
case in
[Yy][Ee][Ss])
if [ -n "" ]; then
add 50 divert natd all from any to any via
fi
;;
esac
esac
############
# If you just configured ipfw in the kernel as a tool to solve
network
# problems or you just want to disallow some particular kinds of
traffic
# then you will want to change the default policy to open. You can
also
# do this as your only action by setting the firewall_type to
``open''.
#
add 65000 pass all from any to any
# Prototype setups.
#
case in
[Oo][Pp][Ee][Nn])
setup_loopback
add 65000 pass all from any to any
;;
[Cc][Ll][Ii][Ee][Nn][Tt])
############
# This is a prototype setup that will protect your system somewhat
# against people from outside your own network.
############
# set these to your network and netmask and ip
net="192.168.1.0"
mask="255.255.255.0"
ip="192.168.1.1"
setup_loopback
# Allow any traffic to or from my own net.
add pass all from to :
add pass all from : to
# Allow TCP through if setup succeeded
add pass tcp from any to any established
# Allow IP fragments to pass through
add pass all from any to any frag
# Allow setup of incoming email
add pass tcp from any to 25 setup
# Allow setup of outgoing TCP connections only
add pass tcp from to any setup
# Disallow setup of all other TCP connections
add deny tcp from any to any setup
# Allow DNS queries out in the world
add pass udp from to any 53 keep-state
# Allow NTP queries out in the world
add pass udp from to any 123 keep-state
# Everything else is denied by default, unless the
# IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel
# config file.
;;
[Ss][Ii][Mm][Pp][Ll][Ee])
############
# This is a prototype setup for a simple firewall. Configure this
# machine as a named server and ntp server, and point all the
machines
# on the inside at this machine for those services.
############
# set these to your outside interface network and netmask and ip
oif="ppp0"
onet="192.0.2.0"
omask="255.255.255.240"
oip="192.0.2.1"
# set these to your inside interface network and netmask and ip
iif="ep0"
inet="192.168.1.0"
imask="255.255.255.0"
iip="192.168.1.1"
setup_loopback
# Stop spoofing
add deny all from : to any in via
add deny all from : to any in via
# Stop RFC1918 nets on the outside interface
add deny all from any to 10.0.0.0/8 via
add deny all from any to 172.16.0.0/12 via
add deny all from any to 192.168.0.0/16 via
# Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes
RESERVED-1,
# DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class
E)
# on the outside interface
add deny all from any to 0.0.0.0/8 via
add deny all from any to 169.254.0.0/16 via
add deny all from any to 192.0.2.0/24 via
add deny all from any to 224.0.0.0/4 via
add deny all from any to 240.0.0.0/4 via
# Network Address Translation. This rule is placed here
deliberately
# so that it does not interfere with the surrounding
address-checking
# rules. If for example one of your internal LAN machines had its
IP
# address set to 192.0.2.1 then an incoming packet for it after
being
# translated by natd(8) would match the `deny' rule above.
Similarly
# an outgoing packet originated from it before being translated
would
# match the `deny' rule below.
case in
[Yy][Ee][Ss])
if [ -n "" ]; then
add divert natd all from any to any via
fi
;;
esac
# Stop RFC1918 nets on the outside interface
add deny all from 10.0.0.0/8 to any via
add deny all from 172.16.0.0/12 to any via
add deny all from 192.168.0.0/16 to any via
# Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes
RESERVED-1,
# DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class
E)
# on the outside interface
add deny all from 0.0.0.0/8 to any via
add deny all from 169.254.0.0/16 to any via
add deny all from 192.0.2.0/24 to any via
add deny all from 224.0.0.0/4 to any via
add deny all from 240.0.0.0/4 to any via
# Allow TCP through if setup succeeded
add pass tcp from any to any established
# Allow IP fragments to pass through
add pass all from any to any frag
# Allow setup of incoming email
add pass tcp from any to 25 setup
# Allow access to our DNS
add pass tcp from any to 53 setup
add pass udp from any to 53
add pass udp from 53 to any
# Allow access to our WWW
add pass tcp from any to 80 setup
# Reject&Log all setup of incoming connections from the outside
add deny log tcp from any to any in via setup
# Allow setup of any other TCP connection
add pass tcp from any to any setup
# Allow DNS queries out in the world
add pass udp from to any 53 keep-state
# Allow NTP queries out in the world
add pass udp from to any 123 keep-state
# Everything else is denied by default, unless the
# IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel
# config file.
;;
[Cc][Ll][Oo][Ss][Ee][Dd])
setup_loopback
;;
[Uu][Nn][Kk][Nn][Oo][Ww][Nn])
;;
*)
if [ -r "" ]; then
fi
;;
esac
natd.conf
dynamic yes
use_sockets yes
same_ports yes
resolv.conf
option domain-name-servers 195.146.100.5;
nameserver 195.146.100.5 #kppp temp entry
nameserver 195.146.100.100 #kppp temp entry
dhcp.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
option domain-name-servers 192.168.1.1;
ddns-update-style none;
# option definitions common to all supported networks...
# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.8 192.168.1.8;
range 192.168.1.70 192.168.1.99;
option domain-name-servers 195.146.100.5;
option domain-name "martin-network.cz";
option routers 192.168.1.1;
}
dhcpd.leases
# All times in this file are in UTC (GMT), not your local timezone.
This is
# not a bug, so please don't ask about it. There is no portable way
to
# store leases in the local timezone, so please don't request this as
a
# feature. If this is inconvenient or confusing to you, we
sincerely
# apologize. Seriously, though - don't ask.
# The format of this file is documented in the dhcpd.leases(5) manual
page.
# This lease file was written by isc-dhcp-V3.0.1rc9
lease 192.168.1.96 {
starts 3 1995/01/04 17:35:35;
ends 4 1995/01/05 05:35:35;
tstp 4 1995/01/05 05:35:35;
binding state free;
hardware ethernet 00:50:04:0b:79:a4;
uid "\001\000P\004\013y\244";
}
lease 192.168.1.95 {
starts 3 1995/01/04 23:09:36;
ends 4 1995/01/05 11:09:36;
tstp 4 1995/01/05 11:09:36;
binding state free;
hardware ethernet 00:10:4b:db:0b:06;
uid "\001\000\020K\333\013\006";
}
lease 192.168.1.97 {
starts 4 1995/01/05 03:53:25;
ends 4 1995/01/05 15:53:25;
tstp 4 1995/01/05 15:53:25;
binding state free;
hardware ethernet 00:20:af:cd:60:04;
uid "\001\000 \257\315`\004";
}
lease 192.168.1.8 {
starts 4 2002/11/21 15:27:57;
ends 5 2002/11/22 03:27:57;
tstp 5 2002/11/22 03:27:57;
binding state active;
next binding state free;
hardware ethernet 00:a0:24:aa:7d:86;
uid "\001\000\240$\252}\206";
client-hostname "jenda";
}
lease 192.168.1.79 {
starts 4 2002/11/21 16:07:19;
ends 5 2002/11/22 04:07:19;
tstp 5 2002/11/22 04:07:19;
binding state active;
next binding state free;
hardware ethernet 00:30:4f:05:9a:fe;
uid "\001\0000O\005\232\376";
client-hostname "Bruno";
}
lease 192.168.1.99 {
starts 4 2002/11/21 19:04:36;
ends 5 2002/11/22 07:04:36;
tstp 5 2002/11/22 07:04:36;
binding state active;
next binding state free;
hardware ethernet 00:a0:24:56:16:f0;
uid "\001\000\240$V\026\360";
client-hostname "martin";
}
lease 192.168.1.98 {
starts 4 2002/11/21 19:09:12;
ends 5 2002/11/22 07:09:12;
tstp 5 2002/11/22 07:09:12;
binding state active;
next binding state free;
hardware ethernet 00:60:97:64:4f:2a;
uid "\001\000`\227dO*";
client-hostname "MARTY";
}
lease 192.168.1.78 {
starts 4 2002/11/21 20:33:42;
ends 5 2002/11/22 08:33:42;
tstp 5 2002/11/22 08:33:42;
binding state active;
next binding state free;
hardware ethernet 00:00:21:4e:cf:0b;
uid "\001\000\000!N\317\013";
client-hostname "TOM";
}
lease 192.168.1.77 {
starts 4 2002/11/21 20:50:12;
ends 5 2002/11/22 08:50:12;
tstp 5 2002/11/22 08:50:12;
binding state active;
next binding state free;
hardware ethernet 00:40:05:66:f5:0e;
uid "\001\000@\005f\365\016";
client-hostname "Mirek";
}
lease 192.168.1.99 {
starts 4 2002/11/21 21:10:24;
ends 5 2002/11/22 09:10:24;
binding state active;
next binding state free;
hardware ethernet 00:a0:24:56:16:f0;
uid "\001\000\240$V\026\360";
client-hostname "martin";
}
lease 192.168.1.99 {
starts 4 2002/11/21 21:10:24;
ends 4 2002/11/21 21:10:27;
tstp 4 2002/11/21 21:10:27;
binding state free;
hardware ethernet 00:a0:24:56:16:f0;
uid "\001\000\240$V\026\360";
}
lease 192.168.1.99 {
starts 4 2002/11/21 21:10:29;
ends 5 2002/11/22 09:10:29;
binding state active;
next binding state free;
hardware ethernet 00:a0:24:56:16:f0;
uid "\001\000\240$V\026\360";
client-hostname "martin";
}
lease 192.168.1.77 {
starts 4 2002/11/21 21:14:46;
ends 5 2002/11/22 09:14:46;
binding state active;
next binding state free;
hardware ethernet 00:40:05:66:f5:0e;
uid "\001\000@\005f\365\016";
client-hostname "Mirek";
}
More information about the Users-l
mailing list