
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.sabayonlinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;feed=atom&amp;action=history</id>
		<title>En:HOWTO: Make a Firewall using Shorewall and Webmin - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;action=history"/>
		<updated>2013-05-24T10:34:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.4</generator>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;diff=20008&amp;oldid=prev</id>
		<title>Hatalar205 at 09:08, 18 November 2012</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;diff=20008&amp;oldid=prev"/>
				<updated>2012-11-18T09:08:34Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:08, 18 November 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{i18n| [[En:HOWTO: Make a Firewall using Shorewall and Webmin|en]] [[Tr:HOWTO: Make a Firewall using Shorewall and Webmin|tr]]}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;OK, I'm sure you are here to learn how to start up your own personal firewall.&amp;#160; This can be made easy via webmin &amp;amp; shorewall. All of the things I'm doing will be using the theme &amp;quot;MSC.Linux Theme&amp;quot;.&amp;#160; If something you are trying doesn't match or look right. I ask that you try that theme while configuring throughout reading this howto and see if that helps.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;OK, I'm sure you are here to learn how to start up your own personal firewall.&amp;#160; This can be made easy via webmin &amp;amp; shorewall. All of the things I'm doing will be using the theme &amp;quot;MSC.Linux Theme&amp;quot;.&amp;#160; If something you are trying doesn't match or look right. I ask that you try that theme while configuring throughout reading this howto and see if that helps.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Lets start&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Lets start&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hatalar205</name></author>	</entry>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;diff=8732&amp;oldid=prev</id>
		<title>Darksurf: webmin no longer defaults to root for user and root password for password.</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=En:HOWTO:_Make_a_Firewall_using_Shorewall_and_Webmin&amp;diff=8732&amp;oldid=prev"/>
				<updated>2010-08-28T21:26:04Z</updated>
		
		<summary type="html">&lt;p&gt;webmin no longer defaults to root for user and root password for password.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;OK, I'm sure you are here to learn how to start up your own personal firewall.  This can be made easy via webmin &amp;amp; shorewall. All of the things I'm doing will be using the theme &amp;quot;MSC.Linux Theme&amp;quot;.  If something you are trying doesn't match or look right. I ask that you try that theme while configuring throughout reading this howto and see if that helps.&lt;br /&gt;
Lets start&lt;br /&gt;
&lt;br /&gt;
open a root terminal and type &amp;quot;equo install webmin shorewall&amp;quot; without the  quotes and press enter. This will take some time so don't worry about time or if its even doing anything.&lt;br /&gt;
&lt;br /&gt;
Once finished, you need to set a user and password for access to webmin. enter the following into your root terminal&lt;br /&gt;
&amp;quot;/usr/libexec/webmin/changepass.pl /etc/webmin {username here} {passwordhere}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now once this is finished type &amp;quot;rc-update add webmin&amp;quot; and press enter in that root terminal.&lt;br /&gt;
Webmin should now load @ boot up.  Restart Your computer and open Firefox. Now in the the box where you usually type in websites type &lt;br /&gt;
&lt;br /&gt;
&amp;quot;https://localhost:10000&amp;quot; &lt;br /&gt;
&lt;br /&gt;
and press enter.  it will ask for a user name and password.  type in the user and password you chose. If you have a problem you can repeat the step&lt;br /&gt;
and change the user and password. Don't worry, all this happens on Your OWN computer and IS encrypted nothing is sent over the network. BTW, its best to not allow Firefox to remember this password.  This is for security reasons. &lt;br /&gt;
&lt;br /&gt;
Now you should see the webmin interface.  If you do not feel comfortable with the interface it is easily themeable to help you feel more comfortable. To change the theme, after login you should see &amp;quot;webmin&amp;quot;. Select that and underneath will appear &amp;quot;Change language and Theme&amp;quot; click it. My personal favorite theme is &amp;quot;MSC.Linux Theme&amp;quot; select personal choice then select the theme and click &amp;quot;make changes&amp;quot;.  When you are ready click &amp;quot;return to index&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;Networking&amp;quot; &lt;br /&gt;
Then click &amp;quot;Shoreline Firewall&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
Now we will start to configure the firewall starting with the &amp;quot;Networking Zones&amp;quot; so click that and then click &amp;quot;Manually edit file&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is what mine &amp;amp; yours should look like.&lt;br /&gt;
{{File| |&lt;br /&gt;
&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
#                                                                                                   &lt;br /&gt;
#Shorewall version 4 - Zones File                                                     &lt;br /&gt;
#                                                                                                   &lt;br /&gt;
#For information about this file, type &amp;quot;man shorewall-zones&amp;quot;               &lt;br /&gt;
#                                                                                                   &lt;br /&gt;
#The manpage is also online at                                                        &lt;br /&gt;
#http://www.shorewall.net/manpages/shorewall-zones.html               &lt;br /&gt;
#                                                                                                    &lt;br /&gt;
############################################# &lt;br /&gt;
#ZONE	TYPE		OPTIONS		IN			OUT                  &lt;br /&gt;
#					         OPTIONS             OPTIONS              &lt;br /&gt;
fw	firewall                                                                                    &lt;br /&gt;
net     ipv4                                                                                       &lt;br /&gt;
#LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
OK, now that you have this down. Is basically saying I have a zone inside the firewall (a.k.a. fw) and a zone outside the firewall (a.k.a. net)&lt;br /&gt;
Now click &amp;quot;SAVE&amp;quot; and then click &amp;quot;return to list of tables&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;Network Interfaces&amp;quot; and click &amp;quot;Manually Edit file&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
This is how it should look.&lt;br /&gt;
{{File| |&lt;br /&gt;
&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Shorewall version 4 - Interfaces File&lt;br /&gt;
#&lt;br /&gt;
# For information about entries in this file, type &amp;quot;man shorewall-interfaces&amp;quot;&lt;br /&gt;
#&lt;br /&gt;
# The manpage is also online at&lt;br /&gt;
# http://www.shorewall.net/manpages/shorewall-interfaces.html&lt;br /&gt;
#&lt;br /&gt;
###################################################################&lt;br /&gt;
#ZONE	INTERFACE	BROADCAST	OPTIONS&lt;br /&gt;
net	       eth1	         detect&lt;br /&gt;
net	       eth0	         detect	&lt;br /&gt;
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Yours may be different pending on what NICs and wireless cards you have installed. instead of &amp;quot;eth1&amp;quot; you may have &amp;quot;wlan0&amp;quot;.  These are your cards that connect you to &amp;quot;outside the firewall&amp;quot; so the zone they connect to should be &amp;quot;net&amp;quot;, of course. To see what interfaces you have type ifconfig as root in a terminal. please do not include &amp;quot;lo&amp;quot; in the Interfaces area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;SAVE&amp;quot; and click &amp;quot;return to list of tables&amp;quot;  (I'm sure you're beginning to see a pattern)&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;Default policies&amp;quot; and click &amp;quot;Manually Edit File&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here is what you should make it look like.&lt;br /&gt;
&lt;br /&gt;
{{File| |&lt;br /&gt;
&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Shorewall version 4 - Policy File&lt;br /&gt;
#&lt;br /&gt;
# For information about entries in this file, type &amp;quot;man shorewall-policy&amp;quot;&lt;br /&gt;
#&lt;br /&gt;
# The manpage is also online at&lt;br /&gt;
# http://www.shorewall.net/manpages/shorewall-policy.html&lt;br /&gt;
#&lt;br /&gt;
######################################################################&lt;br /&gt;
#SOURCE		DEST		POLICY		LOG		LIMIT:BURST&lt;br /&gt;
#				               		      LEVEL&lt;br /&gt;
$FW                  net             ACCEPT&lt;br /&gt;
net                    all              DROP              info&lt;br /&gt;
all                     all              REJECT            info&lt;br /&gt;
#LAST LINE -- DO NOT REMOVE&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Now notice that we now refer to the firewall as &amp;quot;$FW&amp;quot;. This is important. Do not forget when we talk about the firewall as a &amp;quot;source&amp;quot; or &amp;quot;Destination&amp;quot; it will be referred to as &amp;quot;$FW&amp;quot;.  This is different than referring to it as a &amp;quot;ZONE&amp;quot;. Also CAPITAL LETTERS ARE CRUCIAL! If they show up as capital letters in this how to, they must be capitals in the config files or they will NOT work!&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;SAVE&amp;quot; and click &amp;quot;return to list of tables&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;Firewall Rules&amp;quot; and again click &amp;quot;Manually Edit File&amp;quot;&lt;br /&gt;
This is my personal firewall rules as to not restrict myself too much. you may add more or remove some. what ever you like. If you'd like to understand some of the port symbols  port1:port2 means  include all ports from &lt;br /&gt;
port1 to port2. (EX.  1-1024 includes all ports from 1 to 1024)   port1,port2  means include port1 and port2 &lt;br /&gt;
(EX. 1,5,9   means include just ports 1, 5, and 9.)&lt;br /&gt;
&lt;br /&gt;
This is what mine looks like.&lt;br /&gt;
&lt;br /&gt;
{{File| |&lt;br /&gt;
&amp;lt;pre class=&amp;quot;clear&amp;quot;&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Shorewall version 4 - Rules File&lt;br /&gt;
#&lt;br /&gt;
# For information on the settings in this file, type &amp;quot;man shorewall-rules&amp;quot;&lt;br /&gt;
#&lt;br /&gt;
# The manpage is also online at&lt;br /&gt;
# http://www.shorewall.net/manpages/shorewall-rules.html&lt;br /&gt;
#&lt;br /&gt;
####################################################################&lt;br /&gt;
#ACTION		SOURCE	       DEST	PROTO	DEST	SOURCE	  ORIGINAL    RATE	USER/MARK&lt;br /&gt;
#							          PORT     PORT(S)	  DEST	      LIMIT        GROUP&lt;br /&gt;
#SECTION ESTABLISHED&lt;br /&gt;
#SECTION RELATED&lt;br /&gt;
SECTION NEW&lt;br /&gt;
COMMENT Torrent Ports&lt;br /&gt;
ACCEPT	         net	              $FW        tcp	    6881:6968&lt;br /&gt;
ACCEPT	         net	              $FW        udp	   6881:6968&lt;br /&gt;
COMMENT Instant Relay Chat&lt;br /&gt;
ACCEPT	         net	              $FW        tcp	    6667:6668&lt;br /&gt;
COMMENT Samba Filesharing/Active Directory&lt;br /&gt;
ACCEPT           net                  $FW        tcp        139,445&lt;br /&gt;
ACCEPT           net                  $FW        udp        445&lt;br /&gt;
COMMENT Telnet/SSH&lt;br /&gt;
ACCEPT           net                  $FW        tcp        22,23,107,992&lt;br /&gt;
ACCEPT           net                  $FW        udp        22,23,992&lt;br /&gt;
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;Save&amp;quot; and Click &amp;quot;return to list of tables&amp;quot; scroll to the bottom of the page and click &amp;quot;check firewall&amp;quot; if&lt;br /&gt;
everything checks out OK then click &amp;quot;return to list of tables&amp;quot; and then scroll to the bottom of the page again and &lt;br /&gt;
click &amp;quot;Start Firewall&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Great!! Now the Firewall is going, but what if I want it to start up automagically at boot up??&lt;br /&gt;
&lt;br /&gt;
click &amp;quot;System&amp;quot; in your webmin menu&lt;br /&gt;
&lt;br /&gt;
Now click &amp;quot;bootup and shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Scroll to the very bottom of this and press enter and get to a free line with nothing else on it and type &amp;quot;/sbin/shorewall start&amp;quot;&lt;br /&gt;
(without the quotes) and click Save. &lt;br /&gt;
&lt;br /&gt;
Then Click &amp;quot;Networking&amp;quot; in the webmin menu again and once again click &amp;quot;Shoreline Firewall&amp;quot;.&lt;br /&gt;
Search for &amp;quot;Master configuration file&amp;quot; and click it.  On the Left it should say &amp;quot;STARTUP_ENABLED&amp;quot;&lt;br /&gt;
click that text.  And in the Box next to &amp;quot;Value&amp;quot;  make sure the text says &amp;quot;YES&amp;quot;.  If it says &amp;quot;NO&amp;quot; delete&lt;br /&gt;
that and type &amp;quot;YES&amp;quot; and click &amp;quot;SAVE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This should make shorewall start at bootup as root without having you to make it start up yourself.&lt;br /&gt;
&lt;br /&gt;
There, you should have a fully functional Firewall.  Good Luck  ;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Firewalls|Make a Firewall using Shorewall and Webmin]]&lt;/div&gt;</summary>
		<author><name>Darksurf</name></author>	</entry>

	</feed>