ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] хитрый нат
@ 2004-08-31 14:01 Michael Varamashvili
  2004-08-31 14:07 ` Alexandr Leutin
  2004-08-31 14:13 ` Nick S. Grechukh
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Varamashvili @ 2004-08-31 14:01 UTC (permalink / raw)
  To: community

Hу здpаcте community,

  надо сделать вот что:

  есть интерфейс eth1, он смотрит в инет, у него реальный ip, есть внутреннея
  сетка 10.33.20.0/24. У прова есть своя внутренняя сетка, 10.0.0.0/8. Как
  сделать так, что бы если ломимся в инет, то уж в инет, а если нет, то в сетку?
  Я так понял, что просто ip подменять не надо. Сделал так:

[root@router rc.d]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
195.49.232.208  *               255.255.255.252 U     0      0        0 eth1
10.33.20.0      *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         195.49.232.209  0.0.0.0         UG    0      0        0 eth1

195.49.232.209 - гейт который мне сказали.

eth1      Link encap:Ethernet  HWaddr 4C:00:10:38:44:AA
          inet addr:195.49.232.210  Bcast:195.49.232.211  Mask:255.255.255.252

iptables -t nat -A POSTROUTING -o eth1 --dst ! 10.0.0.0/8 -j SNAT --to-source 195.49.232.210

инет ходит, а внутреннея сетка нет. я понимаю, что что-то с натом, но не понимаю
что... O:)



-----------••••··· [ www.magicssoft.ru | www.kaskadterra.ru | www.sakura.magicssoft.ru ]
С уважением, GiniuS.       mailto:GodsForge@inbox.ru
np: b-z-z-z-z
Tearline: Челoвек сoздан для счастья, как птица для бyльoна.
Origin: И с каждым светом будет тень ...



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-31 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 14:01 [Comm] хитрый нат Michael Varamashvili
2004-08-31 14:07 ` Alexandr Leutin
2004-08-31 14:21   ` Re[2]: " Michael Varamashvili
2004-08-31 14:13 ` Nick S. Grechukh
2004-08-31 14:23   ` Re[2]: " Michael Varamashvili
2004-08-31 15:50     ` Nick S. Grechukh

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