ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: AB <sass@uustoll.ee>
To: mandrake-russian@linuxteam.iplabs.ru
Subject: Re: [mdk-re] NAT???
Date: Wed Jan  3 14:59:01 2001
Message-ID: <200101031403.OAA01767@uustoll.ee> (raw)
In-Reply-To: <1004926243.20010103143831@mail.ru>

On Wed, 3 Jan 2001 14:38:31 +0300
Lenya Khachaturov <lenyak@mail.ru> wrote:

LK> Hello mandrake-russian,
LK> 
LK> Что-то у меня не получается настроить NAT... Магические строчки
LK> 
LK> echo 1 > /proc/sys/net/ipv4/ip_forward
LK> ipchains -P forward DENY
LK> ipchains -A forward -s 192.168.0.2 -j MASQ
LK> 
LK> результата не принесли. http и ftp ходят через squid без всякого
LK> маскарадинга, а все остальное (smtp,pop,telnet,ssh etc.) даже с оным
LK> не работает. Поподробнее о конфигурации - Линуксовая машинка на
LK> dial-up c динамическим IP, и Win-клиент (192.168.0.2, установлен
LK> gateway на 192.168.0.1). Такой настройки ipchains достаточно для работы
LK> всех протоколов? Пробовал и более навороченные скрипты с opennet.ru, типа такого:
LK> 
LK> #!/bin/sh

А Вы не пробовали сделать insmod ip_masq_user?

LK> 
LK> # NAT and firewall script
LK> 
LK> LOCAL_NET=192.168.0.0
LK> LOCAL_MASK=255.255.255.0
LK> 
LK> echo 1 > /proc/sys/net/ipv4/ip_forward
LK> 
LK> # Flush ALL chains
LK> ipchains --flush
LK> 
LK> # Delete inet-in and create it anew
LK> ipchains -X inet-in
LK> ipchains -N inet-in
LK> 
LK> # Enable free input from loopback
LK> ipchains -A input -i lo -j ACCEPT
LK> 
LK> # Enable free ping packets routing
LK> ipchains -A input -p ICMP -j ACCEPT
LK> 
LK> # Accept all local packets
LK> ipchains -A input -i eth0 -s ${LOCAL_NET}/${LOCAL_MASK} -j ACCEPT
LK> 
LK> # Accept all UDP packets
LK> ipchains -A input -p UDP -j ACCEPT
LK> 
LK> # Route all packets from Internet to inet-in chain
LK> ipchains -A input -i ppp0 -s ! ${LOCAL_NET}/${LOCAL_MASK} -j inet-in
LK> 
LK> #Transparent proxying
LK> ipchains -A input -p TCP -i ! lo -s ${LOCAL_NET}/${LOCAL_MASK} -d !${LOCAL_NET}/${LOCAL_MASK} www -j REDIRECT 3128
LK> 
LK> # Chain default policies
LK> ipchains -P input DENY
LK> ipchains -P output ACCEPT
LK> ipchains -P forward ACCEPT
LK> 
LK> # Adding rules to inet-in chain
LK> ipchains -A inet-in -p TCP -d 0/0 ssh -j ACCEPT
LK> ipchains -A inet-in -p TCP ! -y -j ACCEPT
LK> 
LK> # Setting priorities
LK> 
LK> ipchains -A output -p TCP -d 0/0 telnet -t 0x01 0x10
LK> ipchains -A output -p TCP -d 0/0 ssh -t 0x01 0x10
LK> ipchains -A output -p TCP -d 0/0 www -t 0x01 0x10
LK> ipchains -A output -p TCP -d 0/0 ftp -t 0x01 0x02
LK> 
LK> # Turning on masquerading
LK> ipchains -A forward -s ${LOCAL_NET}/${LOCAL_MASK} -d !${LOCAL_NET}/${LOCAL_MASK} -j MASQ
LK> 
LK> Скрипт пускался после подъема ppp0. Все равно ничего не работает
LK> -- 
LK> Best regards,
LK>  Lenya                          mailto:lenyak@mail.ru
LK> 
LK> 
LK> 
LK> _______________________________________________
LK> Mandrake-russian mailing list
LK> Mandrake-russian@linuxteam.iplabs.ru
LK> http://linuxteam.iplabs.ru/mailman/listinfo/mandrake-russian
LK> 


--

Best regards
AB
--
				... In nomine Atli, et Ctrli, et Spititus Deli, Reset!




  reply	other threads:[~2001-01-03 14:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-03 14:46 Lenya Khachaturov
2001-01-03 14:59 ` AB [this message]
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]: " äÙÍÙÞ

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=200101031403.OAA01767@uustoll.ee \
    --to=sass@uustoll.ee \
    --cc=mandrake-russian@linuxteam.iplabs.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