From: Lenya Khachaturov <lenyak@mail.ru>
To: mandrake-russian@linuxteam.iplabs.ru
Subject: [mdk-re] NAT???
Date: Wed Jan 3 14:46:01 2001
Message-ID: <1004926243.20010103143831@mail.ru> (raw)
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
next reply other threads:[~2001-01-03 14:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 14:46 Lenya Khachaturov [this message]
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]: " äÙÍÙÞ
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=1004926243.20010103143831@mail.ru \
--to=lenyak@mail.ru \
--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