[Comm] ÄÏÍÁÛÎÑÑ ÓÅÔØ

Pavel Tsybulin =?iso-8859-1?q?pvtcomm_=CE=C1_39871=2Ecopi=2Eru?=
÷Ô éÀÎ 15 20:03:41 MSD 2004


On Tue, Jun 15, 2004 at 09:44:38PM +0700, Andrei Lomov wrote:
> 
> 
> áÄÒÅÓ ÍÁÛÉÎÙ 192.168.1.200
ÍÁÓËÁ ÐÏÄÓÅÔÉ ?
ÄÁÌØÎÅÊÛÅÅ ÕËÁÚÁÎÏ ÄÌÑ 255.255.255.0

> õ ×ÔÏÒÏÊ ÄÏÍÁÛÎÅÊ ÍÁÛÉÎÙ ÁÄÒÅÓ 10.1.1.2
> äÏÐÕÓÔÉÍ, ÐÏËÁ ÎÅÔ ÖÅÌÁÎÉÑ ÓÏ ×ÔÏÒÏÊ ÍÁÛÉÎÙ 
> ÈÏÄÉÔØ × ÌÏËÁÌËÕ.
> þÔÏ ÍÎÅ ÐÒÏÐÉÓÁÔØ ×ÍÅÓÔÏ ×ÏÐÒÏÓÏ×:
> 
ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=static
IPADDR=10.1.1.1
NETMASK=255.255.255.0
BROADCAST=10.1.1.255
NETWORK=10.1.1.0
ONBOOT=yes
> 
ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.200 
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
> 
> é ÎÁ ×ÔÏÒÏÊ ÄÏÍÁÛÎÅÊ ÍÁÛÉÎÅ:
ïÔÌÉÞÉÅ ÔÏÌØËÏ × ÜÔÏÊ ÓÔÒÏËÅ
> IPADDR=10.1.1.2

> 
> é ÍÏÇÕ ÌÉ × ÔÁËÏÍ ÓÌÕÞÁÅ ÏÔÇÏÒÏÄÉÔØÓÑ ÏÔ ÎÅÖÅÌÁÔÅÌØÎÙÈ 
> ÚÁÈÏÄÏ× ÉÚ ÌÏËÁÌËÉ ÎÁ Ó×ÏÉ ÎÅÎÁÇÌÑÄÎÙÅ ÄÏÍÁÛÎÉÅ ÍÁÛÉÎÙ?
> 
÷ÔÏÒÕÀ ÍÁÛÉÎÕ × ÔÁËÏÊ ÓÉÔÕÁÃÉÉ ÚÁÝÉÔÉÔØ ÄÏÓÔÁÔÏÞÎÏ ÐÒÏÓÔÏ: ×ÙËÌÀÞÉÔØ
ÆÏÒ×ÁÒÄÉÎÇ ÐÁËÅÔÏ× ÎÁ ÐÅÒ×ÏÊ.
× /etc/sysctl.conf ÐÒÏ×ÅÒÉÔØ ÜÔÏ:

# Disables packet forwarding
net.ipv4.ip_forward = 0

ÄÌÑ ÐÅÒ×ÏÊ - ÓÌÏÖÎÅÅ, ÎÏ × ÂÏÌØÛÉÎÓÔ×Å ÓÌÕÞÁÅ× ÄÏÓÔÁÔÏÞÎÏ ×ÙËÌÀÞÉÔØ
ÎÅÎÕÖÎÙÅ ÄÅÍÏÎÙ, ÄÌÑ ÎÕÖÎÙÈ ÕÓÔÁÎÏ×ÉÔØ × ÓÐÉÓÏË IPs, Ó ËÏÔÏÒÙÈ ÍÏÖÎÏ
ÉÍÉ ÐÏÌØÚÏ×ÁÔØÓÑ.
äÌÑ ÂÏÌØÛÅÊ ÇÁÒÁÎÔÉÉ ÍÏÖÎÏ ÎÁÓÔÒÏÉÔØ iptables

-- 
- íÁÍÁ, ÍÁÍÁ, Ñ ÎÅ ÈÏÞy ×ÉÄÅÔØ ÂÁÂyÛËy!
-- úÁÔËÎÉÓØ, ÄypÁ, É ËÏÐÁÊ!



ðÏÄÒÏÂÎÁÑ ÉÎÆÏÒÍÁÃÉÑ Ï ÓÐÉÓËÅ ÒÁÓÓÙÌËÉ community