ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [mdk-re] NAT???
@ 2001-01-03 14:46 Lenya Khachaturov
  2001-01-03 14:59 ` AB
  2001-01-03 20:01 ` Igor Solovyov
  0 siblings, 2 replies; 19+ messages in thread
From: Lenya Khachaturov @ 2001-01-03 14:46 UTC (permalink / raw)
  To: mandrake-russian

Hello mandrake-russian,

Что-то у меня не получается настроить NAT... Магические строчки

echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -P forward DENY
ipchains -A forward -s 192.168.0.2 -j MASQ

результата не принесли. http и ftp ходят через squid без всякого
маскарадинга, а все остальное (smtp,pop,telnet,ssh etc.) даже с оным
не работает. Поподробнее о конфигурации - Линуксовая машинка на
dial-up c динамическим IP, и Win-клиент (192.168.0.2, установлен
gateway на 192.168.0.1). Такой настройки ipchains достаточно для работы
всех протоколов? Пробовал и более навороченные скрипты с opennet.ru, типа такого:

#!/bin/sh

# NAT and firewall script

LOCAL_NET=192.168.0.0
LOCAL_MASK=255.255.255.0

echo 1 > /proc/sys/net/ipv4/ip_forward

# Flush ALL chains
ipchains --flush

# Delete inet-in and create it anew
ipchains -X inet-in
ipchains -N inet-in

# Enable free input from loopback
ipchains -A input -i lo -j ACCEPT

# Enable free ping packets routing
ipchains -A input -p ICMP -j ACCEPT

# Accept all local packets
ipchains -A input -i eth0 -s ${LOCAL_NET}/${LOCAL_MASK} -j ACCEPT

# Accept all UDP packets
ipchains -A input -p UDP -j ACCEPT

# Route all packets from Internet to inet-in chain
ipchains -A input -i ppp0 -s ! ${LOCAL_NET}/${LOCAL_MASK} -j inet-in

#Transparent proxying
ipchains -A input -p TCP -i ! lo -s ${LOCAL_NET}/${LOCAL_MASK} -d !${LOCAL_NET}/${LOCAL_MASK} www -j REDIRECT 3128

# Chain default policies
ipchains -P input DENY
ipchains -P output ACCEPT
ipchains -P forward ACCEPT

# Adding rules to inet-in chain
ipchains -A inet-in -p TCP -d 0/0 ssh -j ACCEPT
ipchains -A inet-in -p TCP ! -y -j ACCEPT

# Setting priorities

ipchains -A output -p TCP -d 0/0 telnet -t 0x01 0x10
ipchains -A output -p TCP -d 0/0 ssh -t 0x01 0x10
ipchains -A output -p TCP -d 0/0 www -t 0x01 0x10
ipchains -A output -p TCP -d 0/0 ftp -t 0x01 0x02

# Turning on masquerading
ipchains -A forward -s ${LOCAL_NET}/${LOCAL_MASK} -d !${LOCAL_NET}/${LOCAL_MASK} -j MASQ

Скрипт пускался после подъема ppp0. Все равно ничего не работает
-- 
Best regards,
 Lenya                          mailto:lenyak@mail.ru





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

end of thread, other threads:[~2001-01-09 17:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-03 14:46 [mdk-re] NAT??? Lenya Khachaturov
2001-01-03 14:59 ` AB
2001-01-04 15:48   ` Re[2]: " Lenya Khachaturov
2001-01-03 20:01 ` Igor Solovyov
2001-01-04 15:48   ` Re[2]: " Lenya Khachaturov
2001-01-04 16:02     ` Alexander Bokovoy
2001-01-04 16:32       ` Re[4]: " Lenya Khachaturov
2001-01-04 17:50         ` Re[5]: " Lenya Khachaturov
2001-01-04 18:05           ` Alexander Bokovoy
2001-01-04 19:35           ` Re[6]: " ujo
2001-01-04 19:44           ` ujo
2001-01-05 18:43             ` Re[7]: " Lenya Khachaturov
2001-01-05 19:00               ` AB
2001-01-05 21:01               ` Igor Solovyov
2001-01-07 23:16                 ` Re[9]: " äÙÍÙÞ
2001-01-08 12:18               ` Sergei Epiphanov
2001-01-09 16:29       ` Re[4]: " Lenya Khachaturov
2001-01-09 17:18         ` Alexander Bokovoy
2001-01-04 21:49     ` Re[3]: " äÙÍÙÞ

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