radiohead
Well-Known Member
Hi,
Merkwürdig. Ich dachte, ich hätte das Problem bereits verstanden und alles würde laufen, aber wenn ich nun Pakete mit pkg_add installieren möchte, klappt es nicht. Der Server möchte mit mir auf Port 20 sprechen, was aber verboten wird. Ich dachte der ftp-proxy soll sowas erledigen?
Hier mal meine Daten:
Wenn ich jetzt ein pkg_add mache, erscheint im tcpdump folgendes:
Was muss ich noch ändern, damit ich auch dieses aktive FTP nutzen kann? Ich hoffe doch nicht den Port 20 eingehend freischalten? Das soll doch der Proxy alles erledigen?
Merkwürdig. Ich dachte, ich hätte das Problem bereits verstanden und alles würde laufen, aber wenn ich nun Pakete mit pkg_add installieren möchte, klappt es nicht. Der Server möchte mit mir auf Port 20 sprechen, was aber verboten wird. Ich dachte der ftp-proxy soll sowas erledigen?
Hier mal meine Daten:
Code:
# echo $PKG_PATH
ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/
Code:
# ps ax|grep ftp
24701 ?? Is 0:00.01 ftp-proxy -r
Code:
# cat /etc/pf.conf
### Macros
ext_if="vr2"
int_if="vr0"
vpn_if="enc0"
lan="10.0.100.0/24"
imac="10.0.100.1"
voldemort="{ 127.0.0.1, 10.0.100.231 }"
isn_lan="XXX/24"
isn_jle="XXX"
ipsec_peers="XXX"
isp_dns="{ 213.178.66.111, 213.178.66.112 }"
table <sshattack> persist file "/var/log/sshattack"
### Options
set block-policy drop
set skip on lo
### Default scrub rule
scrub in no-df
### NAT and RDR
nat on $ext_if from !($ext_if) -> ($ext_if)
nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
rdr on $int_if proto tcp from { $lan, $ext_if } to any port ftp -> 127.0.0.1 port 8021
rdr on $int_if proto tcp from { $lan, $ext_if } to any port www -> 127.0.0.1 port 8080
rdr on $ext_if proto tcp from any to any port 6881:6889 -> $imac port 6881:*
rdr on $ext_if proto tcp from any to any port 6969 -> $imac port 6969
rdr on $ext_if proto tcp from any to any port 52525 -> $imac port 52525
### Default block rules
block in log quick from <sshattack> to any
block in log
block out log
### Block basic network scanners
### FTP anchor
anchor "ftp-proxy/*"
### Spoofing protection
antispoof quick for { lo $int_if }
### Allow incoming traffic
pass in log quick on $ext_if proto tcp to ($ext_if) port ssh flags S/SA keep state \
(max-src-conn 10, max-src-conn-rate 5/30, overload <sshattack> flush global)
### Allow IPSec
pass in quick on $ext_if proto esp from $ipsec_peers to $ext_if
pass in quick on $ext_if proto udp from $ipsec_peers to $ext_if port { 500, 4500 }
pass out quick on $ext_if proto esp from ($ext_if) to any
pass out quick on $ext_if proto udp from ($ext_if) to any port { 500, 4500 }
### Allow everything coming in from lan
pass in quick on $int_if
### Allow connections originating from firewall or isn IPSec
pass out on $int_if proto tcp from $voldemort to $imac port ssh
pass out on $int_if proto tcp from $isn_jle to $imac port ssh
pass out on $int_if proto tcp from $isn_jle to $imac port 5900
### Allow IPSec tunnel traffic
pass in quick on $vpn_if
pass out on $vpn_if proto tcp from $lan to $isn_lan port { ssh, domain, www, https, 1494, 2598 }
pass out on $vpn_if proto udp from $lan to $isn_lan port { domain, 1604 }
### Allow outgoing ping to any
pass out log inet proto icmp from { $ext_if, $lan } to any icmp-type echoreq
### Allow outgoing traceroute to any
pass out log inet proto udp from $lan to any port 33433 >< 33626
### Allow outgoing firewall traffic
pass out on $ext_if proto { tcp, udp } from ($ext_if) to $isp_dns port domain
pass out on $ext_if proto { tcp, udp } from ($ext_if) to any port ntp
pass out on $ext_if proto tcp from ($ext_if) to any port www
pass out on $ext_if proto tcp from ($ext_if) to any port { ftp-data, ftp }
### Allow rules for clients
pass out on $ext_if proto tcp from $ext_if to any port { ssh, smtp, imap, https, 465, imaps, 2710, 5190, 5222, 5223, 6881:6889, 6969, 52525 }
pass out on $ext_if proto udp from $ext_if to any port 2000
Wenn ich jetzt ein pkg_add mache, erscheint im tcpdump folgendes:
Code:
# pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/openvpn-2.0.9.tgz
# tcpdump -ttt -n -e -i pflog0
tcpdump: listening on pflog0, link-type PFLOG
Mar 24 12:27:20.761136 rule 1/(match) block in on vr2: 129.128.5.191.20 > XXX.55438: [|tcp]
Was muss ich noch ändern, damit ich auch dieses aktive FTP nutzen kann? Ich hoffe doch nicht den Port 20 eingehend freischalten? Das soll doch der Proxy alles erledigen?