🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by .>hedon Tue, 05 Apr 2011 08:21
Przekierowanie pf filter
#21925
Author: .>hedon
Date: Tue, 05 Apr 2011 08:21
31 lines
2074 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
#21926
Author: 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
Re: Przekierowanie pf filter
#21927
Author: Jacek 'Szumak' Kotlarski
Date: Thu, 28 Apr 2011 19:10
11 lines
1149 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