Vaag probleem. zit hier met een firewall/server die ik gisteren van ipfw naar ipf heb gemaakt. voor dit alles heb ik een make world gedaan op de oude kernel config, ging goed, alles werkte nog, toen nieuwe kernel gemaakt voor ipfilter, dit door:
te veranderen in dit:
mooi, ff rottelen, kernel klaar.
Direkt in /etc/rc.conf van
naar
gegaan. lijkt mij allemaal goed te zijn.
Ook even een /etc/ipf.rules gemaakt:
lijkt mij allemaal goed te zijn, wat is nu het probleem na zo'n lang verhaal, nou iedereen die ik gevraagd heb kan op de normale manier op m'n web server komen behalve ik zelf en alle pc die achter die firewall zitten, die geven "No route to host" errors aan.
Alles werkt verder nog perfect zoals eerst behalve m'n webserver is voor interne netwerk niet te bereiken, ik heb na een middag zitten kloten en zoeken niks kunnen vinden.
Weet een van jullie een oplossing?????
code:
1
2
3
4
5
6
7
8
| options IPFIREWALL #firewall
options IPDIVERT #divert sockets
options IPFIREWALL_VERBOSE #print information about
# dropped packets
options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity
options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN
options TCP_RESTRICT_RST #restrict emission of TCP RST
options ICMP_BANDLIM |
te veranderen in dit:
code:
1
2
3
| options IPFILTER options IPFILTER_LOG options IPFILTER_DEFAULT_BLOCK |
mooi, ff rottelen, kernel klaar.
Direkt in /etc/rc.conf van
code:
1
2
3
4
5
6
7
8
| firewall_enable="YES" # Set to YES to enable firewall functionality firewall_quiet="NO" # Set to YES to suppress rule display firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall firewall_type="open" # Firewall type (see /etc/rc.firewall) natd_enable="YES" # Enable natd (if firewall_enable == YES). natd_flags="-f /etc/natd.conf" # Additional flags for natd. natd_interface="xl0" # Public interface or IPaddress to use. natd_program="/sbin/natd" # path to natd, if you want a different one. |
naar
code:
1
2
3
4
| ipfilter_enable="YES" ipmon_enable="YES" ipmon_flags="-Dsvn" ipnat_enable="YES" |
gegaan. lijkt mij allemaal goed te zijn.
Ook even een /etc/ipf.rules gemaakt:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
| #################################################################
# Outside Interface
#################################################################
#----------------------------------------------------------------
# Allow out all TCP, UDP, and ICMP traffic & keep state on it
# so that it's allowed back in.
#----------------------------------------------------------------
pass out quick on xl0 proto tcp from any to any keep state
pass out quick on xl0 proto udp from any to any keep state
pass out quick on xl0 proto icmp from any to any keep state
block out quick on xl0 all
#----------------------------------------------------------------
# Different Services Are Allowed In.
#----------------------------------------------------------------
# SSH
pass in quick on xl0 proto tcp/udp from any to any port = ssh keep state
# DHCP
pass in quick on xl0 proto tcp/udp from 212.142.28.180/32 to any port = bootpc keep state
# Apache
pass in quick on xl0 proto tcp from any to any port = http flags S keep state
# Ident requests
pass in quick on xl0 proto tcp/udp from any to any port = ident keep state
# Socks Server
pass in quick on xl0 proto tcp/udp from any to any port = socks keep state
# DNETC Proxy
pass in quick on xl0 proto tcp/udp from any to any port = 2064 keep state
#----------------------------------------------------------------
# Block and log all remaining traffic coming into the firewall
# - Block TCP with a RST (to make it appear as if the service
# isn't listening)
# - Block UDP with an ICMP Port Unreachable (to make it appear
# as if the service isn't listening)
# - Block all remaining traffic the good 'ol fashioned way
#----------------------------------------------------------------
block return-rst in log quick on xl0 proto tcp from any to any
block return-icmp-as-dest(port-unr) in log quick on xl0 proto udp from any to any
block in log quick on xl0 all
#################################################################
# Inside Interface
#################################################################
#----------------------------------------------------------------
# Allow out all TCP, UDP, and ICMP traffic & keep state
#----------------------------------------------------------------
pass out quick on xl1 proto tcp from any to any keep state
pass out quick on xl1 proto udp from any to any keep state
pass out quick on xl1 proto icmp from any to any keep state
#----------------------------------------------------------------
# Allow in all TCP, UDP, and ICMP traffic & keep state
#----------------------------------------------------------------
pass in quick on xl1 proto tcp from any to any keep state
pass in quick on xl1 proto udp from any to any keep state
pass in quick on xl1 proto icmp from any to any keep state |
lijkt mij allemaal goed te zijn, wat is nu het probleem na zo'n lang verhaal, nou iedereen die ik gevraagd heb kan op de normale manier op m'n web server komen behalve ik zelf en alle pc die achter die firewall zitten, die geven "No route to host" errors aan.
Alles werkt verder nog perfect zoals eerst behalve m'n webserver is voor interne netwerk niet te bereiken, ik heb na een middag zitten kloten en zoeken niks kunnen vinden.
Weet een van jullie een oplossing?????