ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Sergey <a_s_y@sama.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] etcnet & IP-address обрабатываемого интерфейса
Date: Tue, 21 Nov 2006 01:03:18 +0400
Message-ID: <200611210103.18185.a_s_y@sama.ru> (raw)
In-Reply-To: <ejou0n$tst$1@sea.gmane.org>

On Sunday 19 November 2006 10:36, Вадим Илларионов wrote:

> Так и не нарыл способа выловить сабж. А надо-то при подъёме туннеля до
> некоего РРТР-сервера снатить на полученный адрес всё, что туда лезет.
> Т.е., в /etc/net/ifaces/pppХ/fw/iptables/nat/POSTROUTING прописать нечто
> вроде этого:
> 
> snat-to ${IPADDRESS} to-iface ${NAME}

Не сильно долго думая:

IPADDR=`ip addr show|egrep -e "inet.*ppp"|sed -e "s/.*inet \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/"`

Только с inet.*ppp надо поточнее, мне посмотреть не на чем, как оно у pptp.

-- 
С уважением, Сергей
a_s_y@sama.ru


      reply	other threads:[~2006-11-20 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-19  6:36 Вадим Илларионов
2006-11-20 21:03 ` Sergey [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=200611210103.18185.a_s_y@sama.ru \
    --to=a_s_y@sama.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