ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Maxim.Savrilov@socenter.ru
To: community@altlinux.ru
Subject: Re: [Comm] HELP! Проброс портов через файрволл с политикой DROP
Date: Tue, 7 Sep 2004 09:27:20 +0700
Message-ID: <20040907092720.653cbf0d.Maxim.Savrilov@socenter.ru> (raw)
In-Reply-To: <20040904002217.4c9c9da1.dima@sakhalin.ru>


[-- Attachment #1.1: Type: text/plain, Size: 2350 bytes --]

On Sat, 4 Sep 2004 00:22:17 +1100
Dmitry Lebkov <dima@sakhalin.ru> wrote:

> On Fri, 3 Sep 2004 13:49:39 +0700
> Maxim.Savrilov@socenter.ru wrote:
> 
> > On Fri, 03 Sep 2004 10:17:23 +0400
> > Alexey Morsov <samurai@ricom.ru> wrote:
> 
> [skip]
> 
> > 
> > Правил дофига, брал из какого-то скрипта, пробегавшего в этой же рассылке.
> 
> Скрипт - в студию!

во вложении

> 
> > # Generated by iptables-save v1.2.7a on Thu Sep  2 15:28:28 2004
> > *nat
> > :PREROUTING ACCEPT [2001848:218448129]
> > :POSTROUTING ACCEPT [1181956:79241549]
> > :OUTPUT ACCEPT [1209217:78494570]
> > [0:0] -A PREROUTING -d ! 192.168.0.0/255.255.255.0 -i $INT_IF -p tcp -m tcp --dport 80 -j DROP 
>                                                         ^^^^^^^
> Это откуда? В shell-script'е, который генерит
> правила, ошибка? Насколько я знаю, iptables-save|
> iptables-restore не позволяет таких конструкций.
> 
> До исправления этих ошибок дальше двигаться невозможно.

Нет, это я поменял, в предыдущих письмах у меня была легенда про все эти переменные

Ошибок нет, все грузится нормально.

Но порты нифига не пробрасывает

залез даже на http://www.iptables-script.dk/index1.php

выставил там порт-форвардинг и полученный скрипт запустил после отключения своего файрволла
и то же самое
вижу запросы на соединение, а ответов во внутренней сети нет


#!/bin/sh

# iptables script generator: V0.1-2002
# Comes with no warranty!
# e-mail: michael@1go.dk

# Diable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward

LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth1'
WAN_IP='x.x.x.x'
WAN_NIC='eth0'
FORWARD_IP='y.y.y.y'

# load some modules (if needed)

# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Open ports to server on LAN
iptables -A FORWARD -j ACCEPT -p tcp --dport 3389
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT --to y.y.y.y:3389

# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward



уж тут-то что не так?


-- 
В эпоху романтизма инета мне на root@... девушки писали.
А сейчас роботы, пауки и дебилы... (c) Sun-ch

[-- Attachment #1.2: firewall.bz2 --]
[-- Type: application/x-bzip2, Size: 5212 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 307 bytes --]

  reply	other threads:[~2004-09-07  2:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03  2:14 Maxim.Savrilov
2004-09-03  6:17 ` Alexey Morsov
2004-09-03  6:49   ` Maxim.Savrilov
2004-09-03  7:25     ` Alexey Morsov
2004-09-03  7:32       ` Ivan Fedorov
2004-09-03 13:22     ` Dmitry Lebkov
2004-09-07  2:27       ` Maxim.Savrilov [this message]
2004-09-07  7:06         ` Serge Polkovnikov

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=20040907092720.653cbf0d.Maxim.Savrilov@socenter.ru \
    --to=maxim.savrilov@socenter.ru \
    --cc=community@altlinux.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