Installing ISP-fw (Firewall) On Linux
Installing ISP-fw (Firewall) On LinuxISP-fW is a firewall script that provides port forwarding, packet filtering, stateful packet inspection, port redirection, masquerading, SNAT/ DNAT, TOS, and never the last it generates htb rules for bandwidth management. With ISP-fw, you can turn a PC into a gateway with shaping capabilities. Let's begin: I will assume that you have installed Linux on your box. I use a Debian machine so this tutorial will be for Debian Linux but should not differ much from the rest of the distros.
1. Requirements: - GNU/Linux distribution; For shaping you have to enable QoS for your kernel; this the list for 2.4.x and 2.6.x: Linux Kernel 2.4.32 ( http://www.kernel.org ) If you compile the Kernel from the sources, you will need to select the following options: # Linux Kernel 2.6.16 ( http://www.kernel.org ) If you compile the kernel from the sources, you will need to select the following options: # # !!! NOTE !!!
2. Download and install isp-fw from http://isp-fw.sourceforge.net root@htb:~# wget http://kent.dl.sourceforge.net/sourceforge/isp-fw/ispfw-9.5-rc1.deb root@htb:~# mysql -u user -p password root@htb:~# dpkg -i ispfw-9.5-rc1.deb SQL host [localhost]: You're done installing ISP-fW. Let's go to the configuration.
3. Configure ISP-fW Edit /etc/isp-fw/firewall.conf to your needs (you can use isped fireconfig from the console to trigger the file). A more explained example can be found in the docs or http://isp-fw.wiki.sourceforge.net/Config-Examples. #generated by setup, see docs/cfg/ network_name = Example domain = example.com default_editor = vi default_ipt_policy = ACCEPT net_interface = eth0 lan_interface = eth1 net_ip = 45.93.203.4 clone_mac = no gateway = 45.93.203.1 subnet = 255.255.255.0 fake_mac = 00:0D:A1:D9:D2:DA download = start upload = start bandwith = 2048 kbps burst = 0 qdisc = sfq bgp_file = none htb_mode = none ssh_all = no #I set ssh_all to no, if so you have to enter a list of ips in /etc/isp-fw/ssh.allow ssh_port = 22 use_squid = no squid_port = 3128 load_custom = no masquerade = yes update_hosts = yes optimize = yes opt_conntrack = auto mac_filter = no auto_redirect = no my_web = 1234 block_traceroute = no flood = no no_port_scan = no ping_protection = yes max_conn_per_port = use_dhcp = yes #DHCP section class = 10.10.10.0/255.255.255.0 router = 10.10.10.1 range = 10.10.10.1 10.10.10.254 broadcast = 10.10.10.255 dns = 10.10.10.1, 10.10.10.2 wins = 10.10.10.2 /etc/isp-fw/spam.conf - here you enter blacklisted IP(s)
4. Adding clients to ISP-fW You can add files by using the command isped clienti: root@htb:~# isped clienti Now if you have NAT on your network be sure to have the option masquerade = yes, here's how the file looks: #CAUTION dont leave blank fields! See docs/cfg/clienti.* for more info #MAC IP-LAN IP-NET MINE/MAXE/MINM/MAXM NAME 00:0E:2E:1F:E7:FA 10.10.10.2 0.0.0.0 16/128/1024/1024 Tom 00:0E:2E:1F:E1:AA 10.10.10.3 0.0.0.0 16/512/1024/1024 Britney #00:01:1A:1A:AA:AA 10.10.10.4 0.0.0.0 16/512/1024/1024 Alice #END If have your own class of IPs from arin or any other registrant be sure to set masquerade = no. For this example will assume that we have the class 9.10.11.0/24 allocated. #CAUTION dont leave blank fields! See docs/cfg/clienti.* for more info 00:0E:2E:1F:E7:FA 0.0.0.0 9.10.11.2 16/32/128/1024 Tom 00:02:AA:11:B2:AC 0.0.0.0 9.10.11.3 16/32/256/2048 Britney #00:01:AA:03:04:05 0.0.0.0 9.10.11.4 16/32/256/2048 Alice #END
Tips The "16/32/128/1024" means that Tom has for external bandwidth 16 kbps minimum guaranteed and 32 kbps maximum; for metropolitan networks 128kbps minimum and 1024 kbps maximum. The "#" sign means that the client is disabled, therefore it doesn't have internet access. The "#>" sign means that the client is redirected to your customized suspended web page Now to start the program just type ispfw start
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com







Recent comments
10 hours 27 min ago
11 hours 55 min ago
15 hours 30 min ago
18 hours 23 min ago
21 hours 21 min ago
22 hours 2 min ago
22 hours 17 min ago
23 hours 16 min ago
1 day 21 min ago
1 day 54 min ago