bytemission
Member
hi,
nachdem ich jetzt alles mögliche ausprobiert habe, die foren-suche bemüht hab und es trotzdem nicht klappt, brauche ich jetzt hilfe von "aussen":
meine firewall-regeln sehen folgendermassen aus:
### VARIABLEN ###
Ext = "tun0" # Device an dem das Internet angeschlossen ist
Int = "rl0" # Device an dem das interne Netz haengt
IntNet = "10.0.1.0/24" # Adressraum des internen Netzes
RouterIP = "10.0.1.200" # IP Adresse des Routers
Loop = "lo0" # Loopback Device
# Adressen die auf dem externen Device nicht geroutet werden
# (Adressbereich des internen Netzes muss man wegen der Weiterleitungen zulassen)
NoRoute = "{ 127.0.0.1/8, 172.16.0.0/12, 10.0.0.0/8, 255.255.255.255/32 }"
# Ports die geoeffnet werden sollen
InServicesTCP = "{ ssh, hxd, hxdd, ard }"
#InServicesUDP = "{ hxd, hxdd, ard }"
### OPTIONS ###
# Macht Statistiken fuer die DSL-Verbindung (pfctl -s info)
set loginterface $Ext
# Beendet inaktive Verbindungen schneller - geringerer Speicherverbrauch.
set optimization aggressive
# Fragmentierte Pakete saeubern
scrub on $Ext all fragment reassemble random-id
### NAT & FORWARD ###
# NAT aktivieren (unter Linux als Masquerading bekannt)
nat on $Ext from $IntNet to any -> ($Ext)
# Active FTP - Umleitung zu unserem ftp-proxy
#rdr on $Int proto tcp from !$RouterIP to !$IntNet port 21 -> 127.0.0.1 port 8081
# Apple Remote Desktop Umleitung zu 10.0.1.2 (killamachine)
# rdr on $Ext proto TCP from any to any port 3283 -> 10.0.1.2 port 3283
rdr on $Ext proto udp from any to any port 3283 -> 10.0.1.2 port 3283
rdr-anchor redirect
### FILTER ###
# Zum Debuggen....
#pass quick all # Alles durchlassen
# Generelle Block Regel
block on $Ext
# Freiwillig machen wir keinen mucks
block return log on $Ext
# Wir wollen kein IPv6.0
block quick inet6
# Loopback Device darf alles
pass on $Loop
# Erschwert scannen mit nmap und co.
block in log on $Ext inet proto tcp from any to any flags FUP/FUP
block in log on $Ext inet proto tcp from any to any flags SF/SFRA
block in log on $Ext inet proto tcp from any to any flags /SFRA
# IP Spoofing verhindern
block in log on $Ext inet from $NoRoute to any
block in log on $Ext inet from any to $NoRoute
# Active FTP erlauben
# pass in quick on $Ext inet proto tcp from any to any port > 49151 user proxy flags S/SAFR keep state
# Ping akzeptieren (ablehnen ist uebrigends wenig sinnvoll)
pass in on $Ext inet proto icmp all icmp-type 8 code 0 keep state
# Ports nach aussen oeffnen
pass in on $Ext inet proto tcp from any to any port $InServicesTCP flags S/SAFR keep state label ServicesTCP
pass in on $Ext inet proto udp from any to any port 3283
anchor passin
# Raus darf (fast) alles
pass out on $Ext keep state
prinzipiell funzt es auch, nur die portweiterleitung auf ard (apple remote desktop) 3283 klappt scheinbar nicht.
wenn man pfctl -s rules eingibt erhält man folgendes:
scrub on tun0 all random-id fragment reassemble
block drop on tun0 all
block return log on tun0 all
block drop quick inet6 all
pass on lo0 all
block drop in log on tun0 inet proto tcp all flags FPU/FPU
block drop in log on tun0 inet proto tcp all flags FS/FSRA
block drop in log on tun0 inet proto tcp all flags /FSRA
block drop in log on tun0 inet from 127.0.0.0/8 to any
block drop in log on tun0 inet from 172.16.0.0/12 to any
block drop in log on tun0 inet from 10.0.0.0/8 to any
block drop in log on tun0 inet from 255.255.255.255 to any
block drop in log on tun0 inet from any to 127.0.0.0/8
block drop in log on tun0 inet from any to 172.16.0.0/12
block drop in log on tun0 inet from any to 10.0.0.0/8
block drop in log on tun0 inet from any to 255.255.255.255
pass in on tun0 inet proto icmp all icmp-type echoreq code 0 keep state
pass in on tun0 inet proto tcp from any to any port = ssh flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = hxd flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = hxdd flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = ard flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto udp from any to any port = ard
anchor passin all
pass out on tun0 all keep state
also nix mit der udp 3283 portweiterleitung, oder?
ard, hxd, hxdd sind in /etc/services definiert, sollte also auch gehen...
bitte um konstruktive hilfe...
merci
chris
nachdem ich jetzt alles mögliche ausprobiert habe, die foren-suche bemüht hab und es trotzdem nicht klappt, brauche ich jetzt hilfe von "aussen":
meine firewall-regeln sehen folgendermassen aus:
### VARIABLEN ###
Ext = "tun0" # Device an dem das Internet angeschlossen ist
Int = "rl0" # Device an dem das interne Netz haengt
IntNet = "10.0.1.0/24" # Adressraum des internen Netzes
RouterIP = "10.0.1.200" # IP Adresse des Routers
Loop = "lo0" # Loopback Device
# Adressen die auf dem externen Device nicht geroutet werden
# (Adressbereich des internen Netzes muss man wegen der Weiterleitungen zulassen)
NoRoute = "{ 127.0.0.1/8, 172.16.0.0/12, 10.0.0.0/8, 255.255.255.255/32 }"
# Ports die geoeffnet werden sollen
InServicesTCP = "{ ssh, hxd, hxdd, ard }"
#InServicesUDP = "{ hxd, hxdd, ard }"
### OPTIONS ###
# Macht Statistiken fuer die DSL-Verbindung (pfctl -s info)
set loginterface $Ext
# Beendet inaktive Verbindungen schneller - geringerer Speicherverbrauch.
set optimization aggressive
# Fragmentierte Pakete saeubern
scrub on $Ext all fragment reassemble random-id
### NAT & FORWARD ###
# NAT aktivieren (unter Linux als Masquerading bekannt)
nat on $Ext from $IntNet to any -> ($Ext)
# Active FTP - Umleitung zu unserem ftp-proxy
#rdr on $Int proto tcp from !$RouterIP to !$IntNet port 21 -> 127.0.0.1 port 8081
# Apple Remote Desktop Umleitung zu 10.0.1.2 (killamachine)
# rdr on $Ext proto TCP from any to any port 3283 -> 10.0.1.2 port 3283
rdr on $Ext proto udp from any to any port 3283 -> 10.0.1.2 port 3283
rdr-anchor redirect
### FILTER ###
# Zum Debuggen....
#pass quick all # Alles durchlassen
# Generelle Block Regel
block on $Ext
# Freiwillig machen wir keinen mucks
block return log on $Ext
# Wir wollen kein IPv6.0
block quick inet6
# Loopback Device darf alles
pass on $Loop
# Erschwert scannen mit nmap und co.
block in log on $Ext inet proto tcp from any to any flags FUP/FUP
block in log on $Ext inet proto tcp from any to any flags SF/SFRA
block in log on $Ext inet proto tcp from any to any flags /SFRA
# IP Spoofing verhindern
block in log on $Ext inet from $NoRoute to any
block in log on $Ext inet from any to $NoRoute
# Active FTP erlauben
# pass in quick on $Ext inet proto tcp from any to any port > 49151 user proxy flags S/SAFR keep state
# Ping akzeptieren (ablehnen ist uebrigends wenig sinnvoll)
pass in on $Ext inet proto icmp all icmp-type 8 code 0 keep state
# Ports nach aussen oeffnen
pass in on $Ext inet proto tcp from any to any port $InServicesTCP flags S/SAFR keep state label ServicesTCP
pass in on $Ext inet proto udp from any to any port 3283
anchor passin
# Raus darf (fast) alles
pass out on $Ext keep state
prinzipiell funzt es auch, nur die portweiterleitung auf ard (apple remote desktop) 3283 klappt scheinbar nicht.
wenn man pfctl -s rules eingibt erhält man folgendes:
scrub on tun0 all random-id fragment reassemble
block drop on tun0 all
block return log on tun0 all
block drop quick inet6 all
pass on lo0 all
block drop in log on tun0 inet proto tcp all flags FPU/FPU
block drop in log on tun0 inet proto tcp all flags FS/FSRA
block drop in log on tun0 inet proto tcp all flags /FSRA
block drop in log on tun0 inet from 127.0.0.0/8 to any
block drop in log on tun0 inet from 172.16.0.0/12 to any
block drop in log on tun0 inet from 10.0.0.0/8 to any
block drop in log on tun0 inet from 255.255.255.255 to any
block drop in log on tun0 inet from any to 127.0.0.0/8
block drop in log on tun0 inet from any to 172.16.0.0/12
block drop in log on tun0 inet from any to 10.0.0.0/8
block drop in log on tun0 inet from any to 255.255.255.255
pass in on tun0 inet proto icmp all icmp-type echoreq code 0 keep state
pass in on tun0 inet proto tcp from any to any port = ssh flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = hxd flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = hxdd flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto tcp from any to any port = ard flags S/FSRA keep state label "ServicesTCP"
pass in on tun0 inet proto udp from any to any port = ard
anchor passin all
pass out on tun0 all keep state
also nix mit der udp 3283 portweiterleitung, oder?
ard, hxd, hxdd sind in /etc/services definiert, sollte also auch gehen...
bitte um konstruktive hilfe...
merci
chris