ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Alexy Hammer <srider@mail.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] DNAT для сервера в локальной сети
Date: Mon, 23 Jul 2007 17:57:58 +0400
Message-ID: <46A4B3E6.5020808@mail.ru> (raw)
In-Reply-To: <46A497C6.2030409@soc.adm.yar.ru>


> $IPTABLES -t nat -A PREROUTING --src $INET_CLIENT --dst $INET_IP -i 
> $INET_IFACE -p tcp --dport $PORTS_TCP -j DNAT --to-destination $LAN_SERVER
>
> $IPTABLES -A FORWARD -s $INET_CLIENT -i $INET_IFACE -d $LAN_SERVER -p 
> tcp --dport $PORTS_TCP -j ACCEPT
>
> $IPTABLES -t nat -A PREROUTING --src $INET_CLIENT --dst $INET_IP -i 
> $INET_IFACE -p udp --dport $PORTS_UDP -j DNAT --to-destination $LAN_SERVER
> $IPTABLES -A FORWARD -s $INET_CLIENT -i $INET_IFACE -d $LAN_SERVER -p 
> udp --dport $PORTS_UDP -j ACCEPT
>   
Сразу могу отметить, что не хватает правил для обратного траффика в 
цепочке FORWARD, типа:
${IPTABLES} -A FORWARD  --source ${...} --destination ${...} -m state 
--state RELATED,ESTABLISHED -j ACCEPT
...

с уважением, Алексей


      reply	other threads:[~2007-07-23 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 11:57 "Дворников М.В."
2007-07-23 13:57 ` Alexy Hammer [this message]

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=46A4B3E6.5020808@mail.ru \
    --to=srider@mail.ru \
    --cc=sysadmins@lists.altlinux.org \
    /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 sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git