<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Chillispot Forum — Established TCP connections not reset upon Session-Timeout]]></title>
		<link>http://www.chillispot.org/chilliforum/topic256-established-tcp-connections-not-reset-upon-sessiontimeout.html</link>
		<atom:link href="http://www.chillispot.org/chilliforum/feed-rss-topic256.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Established TCP connections not reset upon Session-Timeout.]]></description>
		<lastBuildDate>Thu, 19 Feb 2009 05:29:45 +0000</lastBuildDate>
		<generator>PunBB 1.4.4</generator>
		<item>
			<title><![CDATA[Re: Established TCP connections not reset upon Session-Timeout]]></title>
			<link>http://www.chillispot.org/chilliforum/post799.html#p799</link>
			<description><![CDATA[<p>check my firewall setup on my openwrt chillispot box<br />IT WORKS FOR ME!!! when the user expired, it close all ports! specially ssh</p><br /><p>====================================<br />=&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;filename: /etc/init.d/S45firewal&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=<br />=&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =<br />====================================<br />#!/bin/sh</p><p>## Please make changes in /etc/firewall.user<br />${FAILSAFE:+exit}</p><p>. /etc/functions.sh<br />WAN=$(nvram get wan_ifname)<br />LAN=$(nvram get lan_ifname)</p><p>## CLEAR TABLES<br />for T in filter nat; do<br />&nbsp; iptables -t $T -F<br />&nbsp; iptables -t $T -X<br />done</p><p>iptables -N input_rule<br />iptables -N output_rule<br />iptables -N forwarding_rule</p><p>iptables -t nat -N prerouting_rule<br />iptables -t nat -N postrouting_rule</p><p>### INPUT<br />###&nbsp; (connections with the router as destination)</p><p>&nbsp; # base case<br />&nbsp; iptables -P INPUT DROP<br />&nbsp; iptables -A INPUT -m state --state INVALID -j DROP<br />&nbsp; iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />&nbsp; iptables -A INPUT -p tcp --tcp-flags SYN SYN --tcp-option \! 2 -j&nbsp; DROP</p><p>&nbsp; #<br />&nbsp; # insert accept rule or to jump to new accept-check table here<br />&nbsp; #<br />&nbsp; iptables -A INPUT -j input_rule</p><p>&nbsp; # allow<br />&nbsp; iptables -A INPUT -i \! $WAN&nbsp; -j ACCEPT&nbsp; &nbsp; &nbsp; &nbsp;# allow from lan/wifi interfaces<br />&nbsp; #iptables -A INPUT -p icmp&nbsp; &nbsp; &nbsp;-j ACCEPT&nbsp; &nbsp; &nbsp; &nbsp;# allow ICM<br />&nbsp; iptables -A INPUT -p gre&nbsp; &nbsp; &nbsp; -j ACCEPT&nbsp; &nbsp; &nbsp; &nbsp;# allow GRE</p><p>&nbsp; # reject (what to do with anything not allowed earlier)<br />&nbsp; iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset<br />&nbsp; #iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable<br />### OUTPUT<br />### (connections with the router as source)</p><p>&nbsp; # base case<br />&nbsp; iptables -P OUTPUT DROP<br />&nbsp; iptables -A OUTPUT -m state --state INVALID -j DROP<br />&nbsp; iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT</p><p>&nbsp; #<br />&nbsp; # insert accept rule or to jump to new accept-check table here<br />&nbsp; #<br />&nbsp; iptables -A OUTPUT -j output_rule</p><p>&nbsp; # allow<br />&nbsp; iptables -A OUTPUT -j ACCEPT&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #allow everything out</p><p>&nbsp; # reject (what to do with anything not allowed earlier)<br />&nbsp; iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset<br />&nbsp; iptables -A OUTPUT -j REJECT --reject-with icmp-port-unreachable</p><p>### FORWARDING<br />### (connections routed through the router)</p><p>&nbsp; # base case<br />&nbsp; iptables -P FORWARD DROP<br />&nbsp; iptables -A FORWARD -m state --state INVALID -j DROP<br />&nbsp; iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu<br />&nbsp; iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT</p><p>&nbsp; #<br />&nbsp; # insert accept rule or to jump to new accept-check table here<br />&nbsp; #<br />&nbsp; iptables -A FORWARD -j forwarding_rule</p><p>&nbsp; # allow<br />&nbsp; iptables -A FORWARD -i br0 -o br0 -j ACCEPT<br />&nbsp; iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT</p><p>&nbsp; # reject (what to do with anything not allowed earlier)<br />&nbsp; # uses the default -P DROP</p><p>### MASQ<br />&nbsp; iptables -t nat -A PREROUTING -j prerouting_rule<br />&nbsp; iptables -t nat -A POSTROUTING -j postrouting_rule<br />&nbsp; iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE</p><br /><p>## USER RULES<br />[ -f /etc/firewall.user ] &amp;&amp; . /etc/firewall.user</p><br /><p>===================================<br />=&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =<br />=&nbsp; filename:/etc/firewall/ssh&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =<br />===================================</p><p>#!/bin/sh<br />. /etc/functions.sh</p><p>WAN=$(nvram get wan_ifname)<br />LAN=$(nvram get lan_ifname)</p><p>iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT<br />iptables&nbsp; &nbsp; &nbsp; &nbsp; -A input_rule&nbsp; &nbsp; &nbsp; -i $WAN -p tcp --dport 22 -j ACCEPT</p>]]></description>
			<author><![CDATA[null@example.com (dannymagat)]]></author>
			<pubDate>Thu, 19 Feb 2009 05:29:45 +0000</pubDate>
			<guid>http://www.chillispot.org/chilliforum/post799.html#p799</guid>
		</item>
		<item>
			<title><![CDATA[Re: Established TCP connections not reset upon Session-Timeout]]></title>
			<link>http://www.chillispot.org/chilliforum/post688.html#p688</link>
			<description><![CDATA[<p>No, I mean that existing, established, SSH connections are NOT closed, when the Chillispot session expires. </p><p>SSH still gets forwarded, even though Chillispot redirects the browser to the hotspotlogin.cgi portal.</p>]]></description>
			<author><![CDATA[null@example.com (grievah)]]></author>
			<pubDate>Tue, 18 Nov 2008 11:28:05 +0000</pubDate>
			<guid>http://www.chillispot.org/chilliforum/post688.html#p688</guid>
		</item>
		<item>
			<title><![CDATA[Re: Established TCP connections not reset upon Session-Timeout]]></title>
			<link>http://www.chillispot.org/chilliforum/post682.html#p682</link>
			<description><![CDATA[<p>SSH can access all host?</p><p>or you open port 22 for ssh in firewall.</p>]]></description>
			<author><![CDATA[null@example.com (easyzonecorp)]]></author>
			<pubDate>Tue, 18 Nov 2008 10:55:30 +0000</pubDate>
			<guid>http://www.chillispot.org/chilliforum/post682.html#p682</guid>
		</item>
		<item>
			<title><![CDATA[Established TCP connections not reset upon Session-Timeout]]></title>
			<link>http://www.chillispot.org/chilliforum/post680.html#p680</link>
			<description><![CDATA[<p>My setup:</p><p>Client&nbsp; (PC) &lt;----&gt; Chillispot v1.1.0 (OpenWRT) &lt;----&gt; Freeradius v1.1.3 (Debian)</p><p>All works as configured and wanted:<br />1. Client tries to access a URL, and is redirected to hotspotlogin.cgi</p><p>2. Chillispot asks Freeradius, which sends back a &quot;Acct-Status-Type = Start&quot;</p><p>3. Client PC can then browse, establish SSH connections, etc etc</p><p>4. Until Freeradius generates an &quot;Acct-Status-Type = Stop&quot;, reason: &quot;Acct-Terminate-Cause = Session-Timeout&quot;</p><p>5. Chillispot receives the information, client PC cannot browse anymore and is redirected to hotspotlogin.cgi</p><br /><p>EXCEPT:<br />6. Client PC <span class="bbu">established</span> SSH connections (puTTy) are still working, even though its browser cannot access any new site !?</p><p>Am I missing something big ?</p>]]></description>
			<author><![CDATA[null@example.com (grievah)]]></author>
			<pubDate>Tue, 18 Nov 2008 07:53:55 +0000</pubDate>
			<guid>http://www.chillispot.org/chilliforum/post680.html#p680</guid>
		</item>
	</channel>
</rss>
