I'm running squid 2.4 as a proxy on a Blade 100, Solaris 8. 2 ethernets: hme1: 10.0.0.1 (internal private net) eri0: 212.X.Y.Z (external Internet connection)
I simply want the machine to proxy, and ipfilter (v3.4.25) to allow 2 way communication on established connections. I want to block everything else hitting eri0. From what I've read, the 'keep state' should do this, but I can't get it to work correctly. Here's what I've got so far (from various FAQs, like http://www.obfuscation.org/ipf/ipf-howto.html#TOC_20): block in log quick on eri0 all pass out quick on eri0 proto tcp from any to any keep state pass out quick on eri0 proto udp from any to any keep state pass out quick on eri0 proto icmp from any to any keep state >From this FAQ I found: block in proto tcp all block out proto tcp all pass in quick proto tcp from any to any port = smtp flags S keep state Which appears to be more specific for sendmail, but removing "port=smtp" should make it more generic. I tried variations on the above 2 examples, but continue to get blocked on return traffic as in the following sample log entry: May 13 21:50:56 proxyboxy ipmon[160]: [ID 702911 local0.warning] 21:50:55.289461 eri0 @0:9 b 207.217.98.16,80 -> 212.X.Y.Z,10331 PR tcp len 20 40 -A IN Any help would be great. Thanks! Info: # uname -a SunOS proxyboxy 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Blade-100 # isainfo -vk 64-bit sparcv9 kernel modules # ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 212.X.Y.Z netmask ffffff00 broadcast 212.X.Y.255 ether 0:3:ba:c:e3:2 hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 10.0.0.1 netmask ffffff00 broadcast 10.0.0.255 ether 0:3:ba:c:e3:2 # netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 212.X.Y.0 212.X.Y.Z U 1 373 eri0 10.0.0.0 10.0.0.1 U 1 241 hme1 default 212.X.Y.W UG 1 858 127.0.0.1 127.0.0.1 UH 21 10679 lo0 # netstat -i Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue lo0 8232 loopback localhost 16318 0 16318 0 0 0 eri0 1500 proxyboxy proxyboxy 745964 43831 32391 1 149 0 hme1 1500 proxy-int proxy-int 575292 0 79439 0 13163 0 # netstat -s -P ip IPv4 ipForwarding = 2 ipDefaultTTL = 255 ipInReceives =486196 ipInHdrErrors = 0 ipInAddrErrors = 0 ipInCksumErrs = 0 ipForwDatagrams = 0 ipForwProhibits = 55268 ipInUnknownProtos = 0 ipInDiscards = 87393 ipInDelivers =138291 ipOutRequests =111232 ipOutDiscards = 0 ipOutNoRoutes = 0 ipReasmTimeout = 60 ipReasmReqds = 0 ipReasmOKs = 0 ipReasmFails = 0 ipReasmDuplicates = 0 ipReasmPartDups = 0 ipFragOKs = 0 ipFragFails = 0 ipFragCreates = 0 ipRoutingDiscards = 0 tcpInErrs = 0 udpNoPorts =207177 udpInCksumErrs = 0 udpInOverflows = 0 rawipInOverflows = 0 ipsecInSucceeded = 0 ipsecInFailed = 0 ipInIPv6 = 0 ipOutIPv6 = 0 ipOutSwitchIPv6 = 1 # ipf -V ipf: IP Filter: v3.4.25 (496) Kernel: IP Filter: v3.4.25 Running: yes Log Flags: 0 = none set Default: pass all, Logging: available Active list: 1 # ipfstat dropped packets: in 0 out 0 non-data packets: in 10 out 10 no-data packets: in 0 out 0 non-ip packets: in 0 out 0 bad packets: in 0 out 0 copied messages: in 1063 out 72921 IPv6 packets: in 0 out 0 input packets: blocked 85142 passed 486238 nomatch 247943 counted 0 short 0 output packets: blocked 5 passed 111249 nomatch 46017 counted 0 short 0 input packets logged: blocked 1520 passed 41 output packets logged: blocked 5 passed 24 packets logged: input 0 output 0 log failures: input 0 output 0 fragment state(in): kept 0 lost 0 fragment state(out): kept 0 lost 0 packet state(in): kept 1463 lost 114 packet state(out): kept 227 lost 0 ICMP replies: 0 TCP RSTs sent: 0 Invalid source(in): 0 Result cache hits(in): 53514 (out): 43388 IN Pullups succeeded: 0 failed: 0 OUT Pullups succeeded: 8 failed: 0 Fastroute successes: 0 failures: 0 TCP cksum fails(in): 0 (out): 0 Packet log flags set: (0) none # ipfstat -io # ipfstat -io pass out quick on eri0 proto tcp from any to any keep state pass out quick on eri0 proto udp from any to any keep state pass out quick on eri0 proto icmp from any to any keep state block in log quick on eri0 from any to any # ipnat -slv mapped in 0 out 0 added 0 expired 0 no memory 0 bad nat 0 inuse 0 rules 0 wilds 0 table ffffffff7ffffc90 list 0 List of active MAP/Redirect filters: List of active sessions: List of active host mappings: # __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
