个人工具

“UbuntuHelp:Firestarter”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Firestarter}}
 
{{From|https://help.ubuntu.com/community/Firestarter}}
 
{{Languages|UbuntuHelp:Firestarter}}
 
{{Languages|UbuntuHelp:Firestarter}}
Parent: [[UbuntuHelp:Software]]
+
Parent: [[Software]]
 
== Firestarter Firewall Configuration ==
 
== Firestarter Firewall Configuration ==
 
Firestarter is an application for configuring your Ubuntu (GNU/Linux) firewall.
 
Firestarter is an application for configuring your Ubuntu (GNU/Linux) firewall.
第13行: 第13行:
 
* View active network connections, including any traffic routed through the firewall
 
* View active network connections, including any traffic routed through the firewall
 
== Screenshot ==
 
== Screenshot ==
https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter.jpg
+
{{https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter.jpg%7D%7D
<br>
+
<<BR>>
https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter-prefs.jpg
+
{{https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter-prefs.jpg%7D%7D
 
== Installation ==
 
== Installation ==
* Via '''[[UbuntuHelp:Synaptic|Synaptic Package Manager]]'''
+
* Via '''[[Synaptic|Synaptic Package Manager]]'''
 
* Via apt-get
 
* Via apt-get
 
<pre><nowiki>
 
<pre><nowiki>
第62行: 第62行:
 
fi
 
fi
 
</nowiki></pre>
 
</nowiki></pre>
Lke this:  
+
Like this:  
 
<pre><nowiki>
 
<pre><nowiki>
 
#if [ "$MASK" = "" -a "$1" != "stop" ]; then
 
#if [ "$MASK" = "" -a "$1" != "stop" ]; then
第70行: 第70行:
 
</nowiki></pre>
 
</nowiki></pre>
 
Save your changes and re-boot.
 
Save your changes and re-boot.
== Other applications you may wish to look at ==
+
==== Stalled connections ====
 +
When you use internet connection with traffic limiting by dropping packets (for example, ADSL ISP)  firestarter may be a cause stalling TCP connections. For example, when you try to scp some megabytes, process hangs up and scp writes "stalled".
 +
This problem is due to bug [[https://bugs.launchpad.net/ubuntu/+source/firestarter/+bug/258863|#258863]] in firestarter. Firestarter contains script (/etc/firestarter/sysctl-tuning), that disables in kernel some TCP mechanisms, that are responsible for effective connection in network with packet loss: SACK, Window-scaling and TCP-timestamps.
 +
If you have such problems, consider using  [[UbuntuHelp:Uncomplicated_Firewall_ufw|ufw]] or comment out following lines in the script mentioned above (I have not tested this):
 +
<pre><nowiki>
 +
# Turn off TCP Timestamping in kernel
 +
if [ -e /proc/sys/net/ipv4/tcp_timestamps ]; then
 +
  echo 0 > /proc/sys/net/ipv4/tcp_timestamps
 +
fi
 +
 
 +
# Set TCP Re-Ordering value in kernel to '5'
 +
if [ -e /proc/sys/net/ipv4/tcp_reordering ]; then
 +
  echo 5 > /proc/sys/net/ipv4/tcp_reordering
 +
fi
 +
 
 +
# Turn off TCP ACK in kernel
 +
if [ -e /proc/sys/net/ipv4/tcp_sack ]; then
 +
  echo 0 > /proc/sys/net/ipv4/tcp_sack
 +
fi
 +
 
 +
#Turn off TCP Window Scaling in kernel
 +
if [ -e /proc/sys/net/ipv4/tcp_window_scaling ]; then
 +
  echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
 +
fi
 +
</nowiki></pre>
 +
Like this
 +
<pre><nowiki>
 +
# Turn off TCP Timestamping in kernel
 +
#if [ -e /proc/sys/net/ipv4/tcp_timestamps ]; then
 +
#  echo 0 > /proc/sys/net/ipv4/tcp_timestamps
 +
#fi
 +
 
 +
# Set TCP Re-Ordering value in kernel to '5'
 +
#if [ -e /proc/sys/net/ipv4/tcp_reordering ]; then
 +
#  echo 5 > /proc/sys/net/ipv4/tcp_reordering
 +
#fi
 +
 
 +
# Turn off TCP ACK in kernel
 +
#if [ -e /proc/sys/net/ipv4/tcp_sack ]; then
 +
#  echo 0 > /proc/sys/net/ipv4/tcp_sack
 +
#fi
 +
 
 +
#Turn off TCP Window Scaling in kernel
 +
#if [ -e /proc/sys/net/ipv4/tcp_window_scaling ]; then
 +
#  echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
 +
#fi
 +
</nowiki></pre>
 +
Save your changes and restart firewall:
 +
<pre><nowiki>
 +
/etc/init.d/firestarter restart
 +
</nowiki></pre>
 +
== Other Programs ==
 +
=== Hardy Heron ===
 +
*[[UbuntuHelp:Uncomplicated_Firewall_ufw|Uncomplicated_Firewall_ufw]]
 
== Further Reading ==
 
== Further Reading ==
* '''[http://www.fs-security.com/ Firestarter]'''
+
* '''[[http://www.fs-security.com/|Firestarter]]'''
* '''[http://www.ubuntugeek.com/firestarter-firewall-for-your-ubuntu-desktop.html]'''
+
* '''[[http://www.ubuntugeek.com/firestarter-firewall-for-your-ubuntu-desktop.html]]'''
* '''[[UbuntuHelp:IptablesHowTo| Ubuntu wiki IptablesHowTo]]
+
* '''[[IptablesHowTo| Ubuntu wiki IptablesHowTo]]
 
----
 
----
 
[[category:CategoryDocumentation]] [[category:CategorySoftware]]
 
[[category:CategoryDocumentation]] [[category:CategorySoftware]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月19日 (日) 05:18的版本

Parent: Software

Firestarter Firewall Configuration

Firestarter is an application for configuring your Ubuntu (GNU/Linux) firewall.

Key Features

  • Suitable for use on desktops, servers and gateways
  • Enables Internet connection sharing
  • Allows you to define both inbound and outbound access policy
  • Wizard for easily configuring your firewall
  • Sets up DHCP for a local network
  • Real time firewall events view
  • View active network connections, including any traffic routed through the firewall

Screenshot

{{https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter.jpg%7D%7D <
> {{https://help.ubuntu.com/community/Firestarter?action=AttachFile&do=get&target=scrn-firestarter-prefs.jpg%7D%7D

Installation

sudo apt-get install firestarter

Hints and Tips

Initial settings

Go under Edit -> Preferences Interface tab

  • Tic off "Enable tray icon" and "Minimize to tray on window close".
  • Your firewall will be active when you boot regardless of if you choose to activate the tray icon or not.

Policy tab (under Interface)

  • Tic off the "Apply policy changes immediately".

Network Settings

  • Select your interface

ICMP Filterings

  • Select "Enable ICMP filtering".
  • I advise you tic off (enable) "Echo request (ping) and "Echo reply (pong).
    • If you do not you will need to enable them if desired for network connection testing/troubleshooting.

Main window

You have three tabs : Status window Shows general information. To disable your firewall Firewall -> Stop firewall To re-enable Firewall -> Start firewall Events This window will show blocked events.

  • To allow a blocked connection, select the blocked connection, right click and select from the pull down menu.

Policy This is where you can set and review connection policies. This view is split, the upper view is for Hosts and the lower window is for Services aka Ports. To make a new policy, right click in either window and choose "Add rule" from the pull down menu.

  • To enable your LAN, use something like 192.168.1.1/24

To edit an existing policy select the appropriate policy in the window, right click, and select "Remove Rule" to delete the policy and "Edit rule" to modify the policy.

Troubleshooting

Network manager

Apparently there is a conflict between Firestarter and Network manager. The "fix" is to edit /etc/firestarter/firestarter.sh

gksu gedit /etc/firestarter/firestarter.sh

Comment out :

if [ "$MASK" = "" -a "$1" != "stop" ]; then
echo "External network device $IF is not ready. Aborting.."
exit 2
fi

Like this:

#if [ "$MASK" = "" -a "$1" != "stop" ]; then
#echo "External network device $IF is not ready. Aborting.."
#exit 2
#fi

Save your changes and re-boot.

Stalled connections

When you use internet connection with traffic limiting by dropping packets (for example, ADSL ISP) firestarter may be a cause stalling TCP connections. For example, when you try to scp some megabytes, process hangs up and scp writes "stalled". This problem is due to bug [[1]] in firestarter. Firestarter contains script (/etc/firestarter/sysctl-tuning), that disables in kernel some TCP mechanisms, that are responsible for effective connection in network with packet loss: SACK, Window-scaling and TCP-timestamps. If you have such problems, consider using ufw or comment out following lines in the script mentioned above (I have not tested this):

# Turn off TCP Timestamping in kernel
if [ -e /proc/sys/net/ipv4/tcp_timestamps ]; then
  echo 0 > /proc/sys/net/ipv4/tcp_timestamps
fi

# Set TCP Re-Ordering value in kernel to '5'
if [ -e /proc/sys/net/ipv4/tcp_reordering ]; then
  echo 5 > /proc/sys/net/ipv4/tcp_reordering
fi

# Turn off TCP ACK in kernel
if [ -e /proc/sys/net/ipv4/tcp_sack ]; then
  echo 0 > /proc/sys/net/ipv4/tcp_sack
fi

#Turn off TCP Window Scaling in kernel
if [ -e /proc/sys/net/ipv4/tcp_window_scaling ]; then
  echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
fi

Like this

# Turn off TCP Timestamping in kernel
#if [ -e /proc/sys/net/ipv4/tcp_timestamps ]; then
#  echo 0 > /proc/sys/net/ipv4/tcp_timestamps
#fi

# Set TCP Re-Ordering value in kernel to '5'
#if [ -e /proc/sys/net/ipv4/tcp_reordering ]; then
#  echo 5 > /proc/sys/net/ipv4/tcp_reordering
#fi

# Turn off TCP ACK in kernel
#if [ -e /proc/sys/net/ipv4/tcp_sack ]; then
#  echo 0 > /proc/sys/net/ipv4/tcp_sack
#fi

#Turn off TCP Window Scaling in kernel
#if [ -e /proc/sys/net/ipv4/tcp_window_scaling ]; then
#  echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
#fi

Save your changes and restart firewall:

/etc/init.d/firestarter restart

Other Programs

Hardy Heron

Further Reading