Linux vermittelt den Internet-Zugang fürs LAN?

Michael Liebe michael.liebe at wirtschaft.fh-bielefeld.de
Sun Aug 29 00:31:01 CEST 1999


Hallo Leute,

so lautete einmal ein Titel der C`t. Wie gesagt, möchte das auch hinkriegen. Also fangen wir mal an, was ich bis jetzt
gemacht habe.

Linux-Rechner:
IP: 192.168.1.1 
Netmask: 255.255.255.0
host: PC1
Domain: Morgenbreede (da sitzte ich und lese Howto`s)
eth1

Laptop:
IP: 192.168.1.4
host: PC4
Domain: Morgenbreede
Subnet-Mask: 255.255.255.0

Hier habe ich folgendes im Netzwerk konfiguriert:
Gateway: 192.168.1.1

Also das Netzwerk funkt soweit. Nur wie schaffe ich es, dass der Linux-Rechner die IP Pakete des Laptop ins Netz befördert.
Die Verbindung ins Netz soll mit einem Modem realisiert werden. 

Als nächstes kommt ein Verkürzung der Einträge aus der Datei squid.conf. Ich habe die # entfernt, wo es mir logisch erschien.
Bei den anderen war ich mir nicht sicher, was hier genau passiert. Es geht los:

http_port 8080
#icp_port 3130
#htcp_port 4827
#mcast_groups 239.128.16.128
tcp_incoming_address 192.168.1.1
tcp_outgoing_address 192.168.1.1
#cache_peer hostname type 3128 3130
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
#fqdncache_size 1024

cache_dir /var/squid/cache 100 16 256
cache_access_log /var/squid/logs/access.log
cache_log /var/squid/logs/cache.log
cache_store_log /var/squid/logs/store.log
cache_swap_log
emulate_httpd_log off
mime_table /usr/share/squid/mime.conf
log_mime_hdrs off
useragent_log none
#pid_filename /var/squid/logs/squid.pid
#debug_options ALL,1
#log_fqdn off
client_netmask 255.255.255.0

#ftp_user Squid@
#ftp_list_width 32
#cache_dns_program /usr/sbin/dnsserver
#dns_children 5
#dns_defnames off
#dns_nameservers none
#unlinkd_program /usr/sbin/unlinkd
#pinger_program /usr/sbin/pinger
#redirect_program none
#redirect_children 5
#redirect_rewrites_host_header on
#authenticate_program none
#authenticate_children 5
#authenticate_ttl 3600

wais_relay_host localhost
wais_relay_port 8000
request_size 100 KB
#Default:
#refresh_pattern ^ftp: 1440 20% 10080
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern . 0 20% 4320
#reference_age 1 month
#quick_abort_min 16 KB
#quick_abort_max 16 KB
#quick_abort_pct 95
#negative_ttl 5 minutes
#positive_dns_ttl 6 hours
#negative_dns_ttl 5 minutes
#range_offset_limit 0 KB

#connect_timeout 120 seconds
#siteselect_timeout 4 seconds
#read_timeout 15 minutes
#request_timeout 30 seconds
#client_lifetime 1 day
#half_closed_clients on
#pconn_timeout 120 seconds
#ident_timeout 10 seconds
#shutdown_lifetime 30 seconds

#Examples:
#acl myexample dst_as 1241
#acl password proxy_auth 300
#
#Defaults:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 21 443 563 70 210 1025-65535
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
icp_access allow all
miss_access allow all

#proxy_auth_realm Squid proxy-caching web server
#ident_lookup_access deny all

#cache_mgr webmaster
#cache_effective_user squid
#cache_effective_group nogroup
#visible_hostname www-cache.foo.org
#unique_hostname www-cache1.foo.org

#announce_host tracker.ircache.net
#announce_port 3131

#httpd_accel_host hostname
#httpd_accel_port port
#httpd_accel_with_proxy off
#httpd_accel_uses_host_header off

#dns_testnames netscape.com internic.net nlanr.net microsoft.com
#logfile_rotate 10
#append_domain .yourdomain.com
#tcp_recv_bufsize 0 bytes
#err_html_text
#memory_pools on
#forwarded_for on
#log_icp_queries on
#icp_hit_stale off
#minimum_direct_hops 4
#cachemgr_passwd secret shutdown
#cachemgr_passwd lesssssssecret info stats/objects
#cachemgr_passwd disable all
#store_avg_object_size 6 KB
#store_objects_per_bucket 50
#client_db on
#netdb_low 900
#netdb_high 1000
#netdb_ping_period 5 minutes
#query_icmp off
#test_reachability off
#buffered_logs off
#reload_into_ims off
#anonymize_headers
#fake_user_agent none
#minimum_retry_timeout 5 seconds
#maximum_single_addr_tries 3
#snmp_port -1
#forward_snmpd_port 0
#snmp_access allow public localhost
#snmp_access deny all
#snmp_incoming_address 0.0.0.0
#snmp_outgoing_address 0.0.0.0
#delay_pools 0
#delay_pools 2 # 2 delay pools
#delay_class 1 2 # pool 1 is a class 2 pool
#delay_class 2 3 # pool 2 is a class 3 pool
#delay_access 1 allow some_big_clients
#delay_access 1 deny all
#delay_access 2 allow lotsa_little_clients
#delay_access 2 deny all
#delay_parameters pool aggregate
#delay_parameters pool aggregate individual
#delay_parameters pool aggregate network individual
#delay_parameters 1 -1/-1 8000/8000
#delay_parameters 2 32000/32000 8000/8000 600/64000
#delay_initial_bucket_level 50
#incoming_icp_average 6
#incoming_http_average 4
#min_icp_poll_cnt 8
#min_http_poll_cnt 8
#uri_whitespace deny
#acl buggy_server url_regex ^http://....
#broken_posts allow buggy_server
#prefer_direct on
#strip_query_terms on

Man das war aber ein Stück arbeit. Kommen wir jetzt kurz zur Datei hosts:


127.0.0.1 localhost
192.168.0.1 PC1.Morgenbreede PC1
192.168.0.2 PC2.Morgenbreede PC2
192.168.0.3 PC3.Morgenbreede PC3
#
192.168.1.1 PC1.Morgenbreede PC1
192.168.1.4 PC4.Morgenbreede PC4

Nun zur Datei lmhost:


# Sample entry:
192.168.1.1 samba
192.168.1.4 PC4

Und zum Schluß zur Datei rc.conf:


KEYTABLE="de-lat1-nd.map.gz"
LANGUAGE="german"
ENABLE_SUSECONFIG=yes
RC_LANG=""
RC_LC_ALL=""
RC_LC_MESSAGES=""
RC_LC_CTYPE=""
RC_LC_COLLATE=""
RC_LC_TIME=""
RC_LC_NUMERIC=""
RC_LC_MONETARY=""
ROOT_USES_LANG="no"
MAIL_REPORTS_TO="root"
MAIL_LEVEL="warn"
MOUSE="/dev/psaux"
MODEM="/dev/ttyS1"
CONSOLE_FONT=""
CONSOLE_SCREENMAP=""
CONSOLE_UNICODEMAP=""
CONSOLE_MAGIC=""
KBD_RATE=""
KBD_DELAY=""
KBD_NUMLOCK="yes"
KBD_CAPSLOCK="no"
KBD_TTY="tty1 tty2 tty3 tty4 tty5 tty6"
GMT=""
TIMEZONE="MET"
START_LOOPBACK="yes"
NETCONFIG="_0 _1"
IPADDR_0="192.168.0.1"
IPADDR_1="192.168.1.1"
IPADDR_2=""
IPADDR_3=""
NETDEV_0="eth0"
NETDEV_1="eth1"
NETDEV_2=""
NETDEV_3=""
IFCONFIG_0="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0 up"
IFCONFIG_1="192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0 up"
IFCONFIG_2=""
IFCONFIG_3=""
SETUPDUMMYDEV="no"
IP_DYNIP=no
IP_TCP_SYNCOOKIES=yes
IP_FORWARD=yes
CHECK_ETC_HOSTS=yes
BEAUTIFY_ETC_HOSTS=yes
SORT_PASSWD_BY_UID=no
FQHOSTNAME="PC1.Morgenbreede"
CREATE_HOSTCONF="yes"
CREATE_RESOLVCONF=yes
SEARCHLIST="Morgenbreede"
NAMESERVER="129.70.5.16 129.70.4.55"
ORGANIZATION=""
NNTPSERVER="news.uni-bielefeld.de"
IRCSERVER=""
START_INETD="yes"
SMTP="yes"
FROM_HEADER="Michael Liebe"
HTTP_PROXY=""
FTP_PROXY=""
GOPHER_PROXY=""
NO_PROXY="localhost"
START_KERNELD="yes"
CRON="yes"
START_PORTMAP="yes"
NFS_SERVER="yes"
USE_KERNEL_NFSD="no"
USE_KERNEL_NFSD_NUMBER="4"
NFS_SERVER_UGID="yes"
REEXPORT_NFS="no"
CLOSE_CONNECTIONS="false"
START_PCNFSD=no
START_BWNFSD=no
PCNFSD_LPSPOOL=/var/spool/lpd
START_RWHOD=no
START_GPM="yes"
GPM_PARAM=" -t ps2 -m /dev/mouse"
START_ROUTED=yes
START_NAMED=no
RUN_UPDATEDB=yes
REINIT_MANDB=yes
RUN_UPDATEDB_AS=nobody
UPDATEDB_NETPATHS=""
UPDATEDB_PRUNEPATHS="/S.u.S.E. /mnt /cdrom /tmp /usr/tmp /var/tmp /var/spool /proc"
UPDATEDB_NETUSER=""
DELETE_OLD_CORE=no
MAX_DAYS_FOR_CORE=7
DELETE_OLD_CATMAN=yes
CATMAN_ATIME=7

CREATE_INFO_DIR="yes"
CHECK_PERMISSIONS=set
PERMISSION_SECURITY="easy local"
MAX_DAYS_FOR_LOG_FILES=365
RPMDB_BACKUP_DIR=/var/adm/backup/rpmdb
MAX_RPMDB_BACKUPS=5
MAX_DAYS_IN_TMP=0
TMP_DIRS_TO_CLEAR="/tmp /var/tmp"
OWNER_TO_KEEP_IN_TMP="root"
CWD_IN_ROOT_PATH="no"

ROOT_LOGIN_REMOTE="no"
HOW_TO_HANDLE_COMMERCIAL_LIBS=link
CHECK_INITTAB=yes
DISPLAYMANAGER=""
DEFAULT_WM="kde"
CONSOLE_SHUTDOWN=reboot
START_ISAPNP=yes
START_NSCD=yes
umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin
rc_done="\033[71G\033[32mdone\033[m"
rc_failed="\033[71G\033[31m\033[1mfailed\033[m"
rc_skipped="\033[71G\033[1mskipped\033[m"
rc_done_up="\033[1A$rc_done"
rc_failed_up="\033[1A$rc_failed"
rc_unused="\033[71G\033[1munused\033[m"
rc_reset="\033[m\017"
START_ATD=yes
UPDATE_GROFF_CONF=yes
GROFF_PAGESIZE=
START_PCMCIA="no"
PCMCIA=""
PCMCIA_PCIC_OPTS=""
PCMCIA_CORE_OPTS=""
CREATE_PERLLOCAL_POD="yes"
GENERATE_PERL_SYSTEM_INCLUDES="yes"
KERNEL_LOGLEVEL=1
SYSLOGD_PARAMS=""
START_APMD=no
START_QUOTA="no"
SVGATEXTMODE=""
JAVARUNT_THREADS_TYPE="green"
START_HTTPD=yes
START_AUTOFS=no
DHCLIENT="no"
DOC_HOST=""
DOC_SERVER="no"
DOC_ALLOW="LOCAL"
FW_START="no"
FW_LOCALNETS=""
FW_FTPSERVER=""
FW_WWWSERVER=""
FW_SSLSERVER=""
FW_SSLPORT="443"
FW_MAILSERVER=""
FW_DNSSERVER=""
FW_NNTPSERVER=""
FW_NEWSFEED=""
FW_WORLD_DEV="eth1"
FW_INT_DEV="eth0"
FW_LOG_ACCEPT="no"
FW_LOG_DENY="yes"
FW_ROUTER=""
FW_FRIENDS="no"
FW_INOUT="no"
FW_SSH="no"
FW_TRANSPROXY_OUT=""
FW_TRANSPROXY_IN=""
FW_REDIRECT=""
FW_TCP_LOCKED_PORTS="1:1023"
FW_UDP_LOCKED_PORTS="1:1023"
MSQ_START="yes"
MSQ_NETWORKS="192.168.1.1/255.255.255.0"
MSQ_DEV="ttyS1"
MSQ_MODULES="ip_masq_cuseeme ip_masq_ftp ip_masq_irc ip_masq_quake ip_masq_raudio ip_masq_vdolive"
START_HYLAFAX=no
START_LPD=yes
START_NTOPD="no"
NTOPD_IFACE="eth0"
NTOPD_PORT="3000"
START_LDAP=no
START_SMB="yes"
SENDMAIL_TYPE="yes"
SENDMAIL_SMARTHOST=""
SENDMAIL_LOCALHOST="localhost"
SENDMAIL_RELAY=""
SENDMAIL_ARGS="-bd -q30m -om"
SENDMAIL_EXPENSIVE="no"
SENDMAIL_NOCANONIFY="yes"
SENDMAIL_GENERICS_DOMAIN=""
START_SQUID=yes
START_XNTPD=no
XNTPD_INITIAL_NTPDATE=""
XNTPD_KERNEL_TICK=""
CREATE_YP_CONF="yes"
YP_DOMAINNAME=""
YP_SERVER=""
START_YPBIND="yes"
START_SSHD=yes
KDM_SHUTDOWN=root
KDM_USERS=""
KDM_BACKGROUND=/opt/kde/share/wallpapers/paper01.jpg
KDM_GREETSTRING=""
KWM_GIMMICK_PIXMAP=""
SUSEWM_UPDATE="yes"
SUSEWM_WM="all"
SUSEWM_MWM="yes"
SUSEWM_XPM="yes"
SUSEWM_ADD=""
SUSEWM_COMPAT="yes"

So und ich hoffe es kann mir jemand helfen. Muß ich sonst noch in einer anderen Datei Einstellungen vornehmen, damit
der Linux-Rechner als Router funktionieren kann und ich mit dem Laptop endlich übers LAN surfen kann?

Kennt jemand evtl. ne Beschreibung die mein Problem ausführlich beschreibt? Wenn ja, bitte URL oder ähnliches.

Ich wünsche allen eine gute Nacht und ich werde jetzt noch ein wenig nach Info`s zu meinem Problem suchen.

Gruß
Michael




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lug-owl.de/pipermail/linux/attachments/19990829/5820e63f/attachment.html>


More information about the Linux mailing list