ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Motsyo Gennadi aka Drool <motsyo@gmail.com>
To: tneo <tneo@mail.ru>, ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] Как настроить инет через сеть?
Date: Sun, 29 Apr 2007 13:26:11 +0300
Message-ID: <463472C3.8040700@gmail.com> (raw)
In-Reply-To: <E1Hi6EK-0007lX-00.tneo-mail-ru@f9.mail.ru>

tneo пишет:
> Всем здрасти!!
> возникла проблема, как настроить чтобы комп мог выходить в инет по сети через другой комп?
> типа шлюза что ли. (до этого не когда такого не настраивал :(
> на обеих машинах установлен linux (kubuntu - altlinux) первая машина подключена к инету через адсл модем
> Просто сеть вроде настроил через nfs а вот как инет поднять не знаю,
> Спасибо 

	Из документации к ALC-2.3:

Настройка роутера

Рассмотрим случай, когда доступ в Интернет для роутера уже настроен. 
Теперь необходимо сделать его шлюзом в Интернет для машин во внутренней 
сети. Предположим, что внутренняя сеть работает через eth0.

# ifconfig eth0 192.168.0.1 netmask 255.255.255.0

Следующей командой компьютер с Linux превращается в маршрутизатор.
# cat 1 > /proc/sys/net/ipv4/ip_forward

Теперь производим маскарадинг:
# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE

Остатся создать локальный DNS-сервер:
# apt-get install bind # /etc/init.d/bind start

Настройка роутера
В сетевых настройках клиента необходимо указать следующие настройки:

static IP
от 192.168.0.2 до 192.168.0.254
netmask
255.255.255.0
DNS
192.168.0.1
Шлюз (gateway)
192.168.0.1

В настройках браузера указываем, что подключение происходит по локальной 
сети.


  parent reply	other threads:[~2007-04-29 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29 10:02 tneo
2007-04-29 10:15 ` Serge
2007-04-29 10:26 ` Motsyo Gennadi aka Drool [this message]
2007-04-29 14:30   ` tneo
2007-04-29 14:48     ` Motsyo Gennadi aka Drool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=463472C3.8040700@gmail.com \
    --to=motsyo@gmail.com \
    --cc=community@lists.altlinux.org \
    --cc=tneo@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git