ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] iptables и SNAT
@ 2005-03-22 17:33 Владимир Гусев
  2005-03-23  4:29 ` Mike Lykov
  2005-03-23  6:03 ` Afanasov Dmitry
  0 siblings, 2 replies; 19+ messages in thread
From: Владимир Гусев @ 2005-03-22 17:33 UTC (permalink / raw)
  To: ALT Linux Community

Здравствуйте!

Подскажите, в чем разница между двумя нижеперечисленными возможными  
вариантами "поднятия" NAT при помощи iptables?

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --out-source  
"внешний ip шлюза"
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --out-source "внешний ip  
шлюза" (где eth0 - внешний сет. интерфейс шлюза)

Дело в том, что в простейшем варианте шлюза на Linux вариант с -o eth0 не  
работает (клиенты теряют доступ в Интернет)... В последний раз (очистив  
при помощи iptables -F POSTROUTING и для верности удалил все из  
/etc/sysconfig/iptables и перегрузив сервис service iptables resart)  
применил так:

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT  
--out-source "внешний ip шлюза",
т.е. объединив оба эти варианта.. итоги записал при помощи команды  
iptables-save...

SNAT использовал по причине статического внешнего IP для шлюза...

-- 
С уважением, Владимир Гусев


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

end of thread, other threads:[~2005-03-25 18:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 17:33 [Comm] iptables и SNAT Владимир Гусев
2005-03-23  4:29 ` Mike Lykov
2005-03-23  5:19   ` Владимир Гусев
2005-03-23  7:19     ` Mike Lykov
2005-03-23  6:03 ` Afanasov Dmitry
2005-03-23  7:48   ` Владимир Гусев
2005-03-23 10:10     ` iLL
2005-03-23 11:32       ` Andriy Dobrovol's'kii
2005-03-24 18:25         ` [Comm] iptables и SNAT - КАК КОРРЕКТНО СОХРАНИТЬ СОЗДАННЫЕ ФИЛЬТРЫ И ПРАВИЛА Владимир Гусев
2005-03-24 20:32           ` Pavel Usischev
2005-03-24 23:40             ` Владимир Гусев
2005-03-25  4:41               ` Mike Lykov
2005-03-25  6:32                 ` Dmytro O. Redchuk
2005-03-25 18:23             ` Владимир Гусев
2005-03-23 13:41   ` [Comm] iptables и SNAT Владимир Гусев
2005-03-24  2:32     ` Максим Ткаченко
2005-03-24  5:23       ` Владимир Гусев
2005-03-24 17:32   ` [Comm] iptables и SNAT - КАК КОРРЕКТНО СОХРАНИТЬ СОЗДАННЫЕ ФИЛЬТРЫ И ПРАВИЛА Владимир Гусев
2005-03-24 17:39     ` Andrey Rahmatullin

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