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
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video







Recent comments
1 day 6 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 17 hours ago
1 day 17 hours ago
1 day 19 hours ago
1 day 20 hours ago
2 days 2 hours ago
2 days 3 hours ago
2 days 6 hours ago