🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.bsd
Article #21926

Re: Przekierowanie pf filter

#21926
From: Dominik Zyla
Date: Fri, 15 Apr 2011 14:05
38 lines
2010 bytes
On 05.04.2011, .>hedon <c2n.rybicki@gmail.com> wrote:
> Witam,
>
> Chce przekierować ruch z localhosta serwera na zewnętrzny serwer.\
>
> Mam coś takiegow pf.conf:
>
> ext_if = "xn0"
> ext_ip = "xx.xx.xx.xx, 192.168.254.102"
> int_if = "lo0"
> int_ip = "127.0.0.1"
>
> # Redirect mysql local host to remont host 192.168.254.101
> rdr on $int_if inet proto tcp from any to any port 3306 ->
> 192.168.254.101 port 3306
> # Redirect smpt local host to remont host 192.168.254.100
> rdr on $int_if inet proto tcp from any to any port 25 ->
> 192.168.254.100 port 25
>
>
> W pftop widzę coś takiego:
>
> PR        DIR SRC
> DEST                                              STATE
> AGE       EXP     PKTS    BYTES
> tcp       In  127.0.0.1:55545
> 192.168.254.100:25                            CLOSED:SYN_SENT
> 00:00:19  00:00:23       10      692
>
> I oczywiście nie działa może jakaś sugestia?

O ile host z pf-em nie jest gatewayem dla 192.168.254.100 i 192.168.254.101,
to taka konfiguracja nie ma prawa działać. Lepiej użyć czegoś w rodzaju
haproxy. Jeśli koniecznie chcesz, by robił to pf, pokombunuj ze
statycznym routingiem.

-- 
Dominik Zyla
Technical Details
Message-ID: <slrniqgk4c.1i05.gavroche@mail.mercom.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!not-for-mail
References: <b12839a2-eb04-478f-95c5-04b3cd198feb@n12g2000yqc.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!not-for-mail
From: Dominik Zyla <gavroche@gavroche.CUT-THIS.pl>
Newsgroups: pl.comp.os.bsd
Subject: Re: Przekierowanie pf filter
Date: Fri, 15 Apr 2011 14:05:00 +0000 (UTC)
Organization: NASK - www.nask.pl
Lines: 38
Message-ID: <slrniqgk4c.1i05.gavroche@mail.mercom.pl>
References: <b12839a2-eb04-478f-95c5-04b3cd198feb@n12g2000yqc.googlegroups.com>
NNTP-Posting-Host: mail.mercom.pl
Mime-Version: 1.0
X-Trace: pippin.nask.net.pl 1302876300 17813 195.187.153.4 (15 Apr 2011 14:05:00 GMT)
X-Complaints-To: abuse ATSIGN nask.pl
NNTP-Posting-Date: Fri, 15 Apr 2011 14:05:00 +0000 (UTC)
User-Agent: slrn/0.9.9p1 (FreeBSD)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit