Firewall for Linux users
Moderators: [SCUM] FeRoL, [SCUM] OUTLAW
3 posts • Page 1 of 1
Firewall for Linux users
================================
Linux has a built in firewall called IPTABLES
To find it in your installation, open a shell and type:
#locate iptables
You'll probably get a long scrolling list, but the firewall settings can usually be found at:
/etc/sysconfig/iptables
etc - pronounced "et-see" has many system files within. Careful modding any file in the etc folder while logged in as root.
Once you identify the iptables location, you can look at or even edit the file through the shell. There are many ways to edit files in Linux. The oldest being vi, but the commands in vi can be troublesome for beginning linux users. I would recommend using pico or nano to look at your files for now. Try nano first as most of the commands you need to exit, save and exit, search files will be at the bottom of the shell window.
[root@bob ~]# nano /etc/sysconfig/iptables
[root@bob ~]# nano /etc/sysconfig/iptables-config
[root@bob ~]# nano /etc/sysconfig/iptables.save
Don't touch any settings, just have a look and see what ports are open. Feel free to change port 80 to port 81 and then save and exit (commands are at the bottom of the shell - in my environment Ctrl + x will save and exit). Then try to open a browser to access the web. It won't. nano in to the file again by hitting the up arrow on your keyboard (you can see a history of all your work and typed commands by doing this). Change the port back to 80, save then exit. Try your browser. You should be able to access the internets again.
There are third-party apps to make tweaking your firewall/iptables through an application, but if you're hell bent on learning Linux, then you need to learn it the proper way - through a shell.
Linux has a built in firewall called IPTABLES
To find it in your installation, open a shell and type:
#locate iptables
You'll probably get a long scrolling list, but the firewall settings can usually be found at:
/etc/sysconfig/iptables
etc - pronounced "et-see" has many system files within. Careful modding any file in the etc folder while logged in as root.
Once you identify the iptables location, you can look at or even edit the file through the shell. There are many ways to edit files in Linux. The oldest being vi, but the commands in vi can be troublesome for beginning linux users. I would recommend using pico or nano to look at your files for now. Try nano first as most of the commands you need to exit, save and exit, search files will be at the bottom of the shell window.
[root@bob ~]# nano /etc/sysconfig/iptables
[root@bob ~]# nano /etc/sysconfig/iptables-config
[root@bob ~]# nano /etc/sysconfig/iptables.save
Don't touch any settings, just have a look and see what ports are open. Feel free to change port 80 to port 81 and then save and exit (commands are at the bottom of the shell - in my environment Ctrl + x will save and exit). Then try to open a browser to access the web. It won't. nano in to the file again by hitting the up arrow on your keyboard (you can see a history of all your work and typed commands by doing this). Change the port back to 80, save then exit. Try your browser. You should be able to access the internets again.
There are third-party apps to make tweaking your firewall/iptables through an application, but if you're hell bent on learning Linux, then you need to learn it the proper way - through a shell.
-

[SCUM] McPhil - Super Admin

- Posts: 2190
- Joined: 06 Jul 2006, 18:33
Re: Firewall for Linux users
nice one
-

[SCUM]-Herbs - Administrator

- Posts: 1167
- Joined: 07 Jul 2006, 10:09
- Location: Kent
Re: Firewall for Linux users
Thanks for the info McPhil. I really like the terminal - so many possibilities - directly download Java for one
-

[SCUM] Leroy - Super Admin

- Posts: 403
- Joined: 06 Jul 2006, 22:27
- Location: Up a tree
3 posts • Page 1 of 1
