ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Serge <skompan@kspu.kr.ua>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] перенаправление маркированых пакетов
Date: Thu, 10 Apr 2008 06:52:54 +0200
Message-ID: <200804100752.54783.skompan@kspu.kr.ua> (raw)
In-Reply-To: <47FCF670.4090906@anti.su>

> Кстати, у Вас прописано: 192.168.1.2/255.255.255.0 - это ошибка,
> адрес хоста с маской сети класса С.
> Предположим, что Вы имели в виду просто адрес хоста 192.168.1.2.
>
> Насколько я понял, Вы хотите, чтобы пакеты в сеть 172.26.15.0/24
> и в локальную сеть 192.168.1.0/24 шли бы дефолтным маршрутом, а во все
> остальные сети - не дефолтным маршрутом.
> IMHO вот это обеспечит Ваши нужды:
>
> iptables -t mangle -A PREROUTING -s 192.168.1.2 -d 192.168.1.0/24 \
> -j RETURN
>
> iptables -t mangle -A PREROUTING -s 192.168.1.2 -d ! 172.26.15.0/24 \
> -j MARK --set-mark 2
Спасибо Gosha!
правда, cделал таким образом:

cat MARK
if from 192.168.1.2 to 172.26.15.0/24 mark 5 
if from 192.168.1.2  to 172.26.15.0/24 return

if from 192.168.1.2  to ! 192.168.1.0/24 mark 2 
if from 192.168.1.2  to ! 192.168.1.0/24 return
return
последний return лишний, но оставил на всяк случай


      reply	other threads:[~2008-04-10  4:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07  6:21 Serge
2008-04-09  4:50 ` Gosha
2008-04-09  7:25   ` Serge
2008-04-09 17:01     ` Gosha
2008-04-10  4:52       ` Serge [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=200804100752.54783.skompan@kspu.kr.ua \
    --to=skompan@kspu.kr.ua \
    --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