(no subject)

Ken yellowdog-newbie@lists.terrasoftsolutions.com
Mon, 25 Nov 2002 00:10:16 -0500


--============_-1173921477==_ma============
Content-Type: text/plain; charset="iso-8859-1" ; format="flowed"
Content-Transfer-Encoding: 8bit

By the way for anybody trying this script here are some corrections...

SHOULD BE:
#!/bin/sh

	echo "Starting Routing Script...."
	echo 1 > /proc/sys/net/ipv4/ip_forward

	iptables -F
	iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 200.30.28.20
	iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
	iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT
	iptables -P INPUT DROP
	iptables -A FORWARD -i eth0 -o eth0 -j REJECT

	echo "it´s Done : ) "

or for dialup Connections...


#!/bin/sh

	echo "Starting Routing Script...."
	echo 1 > /proc/sys/net/ipv4/ip_forward

	iptables -F
	iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
	iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
	iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
	iptables -P INPUT DROP
	iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT

	echo "it´s Done : ) "

small yes, but as I discovered make the world of difference lol.
-- 



Vote wisely:)

http://www.marijuanaparty.com

"When the people fear the government you have tyranny...when the 
government fears the people you have liberty."
--Thomas Jefferson
--============_-1173921477==_ma============
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: (no subject)</title></head><body>
<div>By the way for anybody trying this script here are some
corrections...</div>
<div><br></div>
<div>SHOULD BE:</div>
<div><font face="Courier New" size="+1" color="#000000">#!/bin/sh<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>echo
&quot;Starting Routing Script....&quot;</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>echo 1 &gt; /pro</font><font face="Courier New" size="+1"
color="#FF0000">c</font><font face="Courier New" size="+1"
color="#000000">/sys/net/ipv4/ip_forward</font></div>
<div><font face="Courier New" size="+1" color="#000000"><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>iptables
-F</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to
200.30.28.20</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A INPUT -m state --state ESTABLISHED</font><font
face="Courier New" size="+1" color="#FF0000">,</font><font
face="Courier New" size="+1" color="#000000">RELATED -j
ACCEPT</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A INPUT -m state --state NEW -i ! eth0 -j
ACCEPT</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -P INPUT DROP</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A FORWARD -i eth0 -o eth0 -j REJECT</font></div>
<div><font face="Courier New" size="+1" color="#000000"><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>echo
&quot;it´s Done : ) &quot;<br>
<x-tab>&nbsp; </x-tab></font><font face="Times New Roman" size="+2"
color="#000000"><br>
or for dialup Connections...<br>
<br>
</font><font face="Courier New" size="+1" color="#000000"><br>
#!/bin/sh<br>
<br>
<x-tab>&nbsp;&nbsp; </x-tab>echo &quot;Starting Routing
Script....&quot;</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>echo 1 &gt; /pro</font><font face="Courier New" size="+1"
color="#FF0000">c</font><font face="Courier New" size="+1"
color="#000000">/sys/net/ipv4/ip_forward</font></div>
<div><font face="Courier New" size="+1" color="#000000"><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>iptables
-F</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -t nat -A POSTROUTING -o ppp0 -j
MASQUERADE</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A INPUT -m state --state ESTABLISHED</font><font
face="Courier New" size="+1" color="#FF0000">,</font><font
face="Courier New" size="+1" color="#000000">RELATED -j
ACCEPT</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A INPUT -m state --state NEW -i ! ppp0 -j
ACCEPT</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -P INPUT DROP</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT</font></div>
<div><font face="Courier New" size="+1"
color="#000000"><br></font></div>
<div><font face="Courier New" size="+1"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>echo &quot;it´s Done : ) &quot;</font></div>
<div><br></div>
<div>small yes, but as I discovered make the world of difference
lol.</div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><br>
<br>
<br>
Vote wisely:)<br>
<br>
http://www.marijuanaparty.com<br>
<br>
&quot;When the people fear the government you have tyranny...when the
government fears the people you have liberty.&quot;<br>
--Thomas Jefferson</div>
</body>
</html>
--============_-1173921477==_ma============--