🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by ".>hedon" Tue, 05 Apr 2011 01:21
Przekierowanie pf filter
#22080
Author: ".>hedon"
Date: Tue, 05 Apr 2011 01:21
31 lines
827 bytes
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?

Pozdrawiam
Re: Przekierowanie pf filter
#22082
Author: Dominik Zyla
Date: Fri, 15 Apr 2011 14:05
38 lines
1164 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
Re: Przekierowanie pf filter
#22083
Author: Jacek 'Szumak' K
Date: Thu, 28 Apr 2011 21:10
11 lines
189 bytes
W dniu 05.04.2011 10:21, .>hedon pisze:

> I oczywi¶cie nie dzia³a mo¿e jaka¶ sugestia?
>
> Pozdrawiam

Przeczytaæ: http://openbsd.org/faq/pf/rdr.html

--
W nag³ówku spamtrap.
Pozdrawiam.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads