🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

serwer + 2 ISP + pf + bez nat

#20872
From: Dariusz Rubinkiewicz
Date: Thu, 23 Apr 2009 22:58
64 lines
2662 bytes
Witam. 
Serwer na Freebsd 7.1, 2 lacza od ISP, ssh nasluchujace na adresach z
obydwu sieci.  


PF okrojony na maxa aby wyeliminowac przypadkowe bledy:
#interfejs dla lacza 1
ext_if1 = "sk0" 
#interfejs dla lacza 2
ext_if2 = "tl0" 

# adres GW dla lacza 1
ext_gw1 = "xxx.xxx.xxx.xxx"

# adres GW dla lacza 2 
ext_gw2 = "zzz.zzz.zzz.zzz" 

#set state-policy if-bound

pass out log (all) on $ext_if1 proto tcp from any to any
 flags S/SA keep state 

pass out log (all) on $ext_if1 proto { udp, icmp } from any to any 
 keep state 

pass out log (all) on $ext_if2 proto tcp from any to any 
 flags S/SA keep state 

pass out log (all) on $ext_if2 proto{ udp, icmp } from any to any
 keep state

pass out log (all) on $ext_if1 route-to ($ext_if2 $ext_gw2) 
 from $ext_if2 to any 

pass out log (all) on $ext_if2 route-to ($ext_if1 $ext_gw1) 
 from $ext_if1 to any

Default gw w tablicy routingu via lacze_1. Proba dostania sie na
maszyne za pomoca ssh laczem_1 bez problemu. Proba dostania sie na
maszyne po ssh laczem_2 - kaplica.

Probowalem z opcja state-policy if-bound i bez tej opcji, probowalem dla
tcp i keep state i modulate state.

Tcpdump pokazuje ze na tl0 pakiety na port 22 przychodza:

00:25:23.560682 IP 195.225.76.25.52722 > zzz.zzz.zzz.zzz.22: S
798197045:798197045(0) win 5840 <mss 1460,sackOK,timestamp 405870543
0,nop,wscale 0>

Po chwili jednak pojawia sie:
00:25:23.565682 IP 88.220.127.89 > zzz.zzz.zzz.zzz: ICMP host
195.225.76.25 unreachable - admin prohibited filter, length 36

88.220.127.89 to router brzegowy dla klasy xxx.xxx.xxx.xxx dla mojego
dostawcy lacza_1. Czyli pakiety wyjsciowe miast pojsc przez tl0
czyli laczem_2 poszly via sk0 czyli laczem_1 

Gdzie robie blad ? Moze cos w sysctlu musze wlaczyc ? 

Pozdrawiam.

-- 
vdr.
Technical Details
Message-ID: <20090424005853.00002856@unknown>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.vectranet.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.vectranet.pl!not-for-mail
From: Dariusz Rubinkiewicz <vdr@debesciak.nie.lubie.spamu.net>
Newsgroups: pl.comp.os.bsd
Subject: serwer + 2 ISP + pf + bez nat
Date: Fri, 24 Apr 2009 00:58:53 +0200
Organization: VectraNET - http://www.vectranet.pl
Lines: 68
Message-ID: <20090424005853.00002856@unknown>
NNTP-Posting-Host: 78.88.19.249
Mime-Version: 1.0
X-Trace: news.vectranet.pl 1240525136 18383 78.88.19.249 (23 Apr 2009 22:18:56 GMT)
X-Complaints-To: usenet@news.vectranet.pl
NNTP-Posting-Date: Thu, 23 Apr 2009 22:18:56 +0000 (UTC)
X-Newsreader: Claws Mail 3.7.0 (GTK+ 2.10.13; i586-pc-mingw32msvc)
X-Antivirus: avast! (VPS 090423-0, 2009-04-23), Outbound message
X-Antivirus-Status: Clean
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit