SlideShare a Scribd company logo
1 of 25
TRAINING REPORT ON
SYS - FIREWALL
Secure Your System
A handy tool for System-Administrators
Chandra Prakash Pathak
08EMTCS032
Computer Science
Maharishi Arvind Institute of Engineering and Technology, Jaipur
http://technostall.com
Company Profile- Linux World
• The best awarded Red Hat partner in India.
• The company has been contributing a great
deal to Linux Server & Networking industry by
fulfilling its need for trained manpower in the
field of Linux support, Networking, System
Integration & Programming.
GREEN-HORNE PROJECT
(An open source operating system)
Module: SYS Firewall
What is a Firewall?
A firewall is hardware, software, or a combination of both that is used to
prevent unauthorized programs or Internet users from accessing a private
network and/or a single computer.
How does a software firewall work?
• Inspects each individual “packet” of data as it
arrives at either side of the firewall
• Inbound to or outbound from your computer
• Determines whether it should be allowed to
pass through or if it should be blocked
Firewall Rules
• Allow – traffic that flows automatically
because it has been deemed as “safe” (Ex.
Meeting Maker, Eudora, etc.)
• Block – traffic that is blocked because it has
been deemed dangerous to your computer
• Ask – asks the user whether or not the traffic
is allowed to pass through
What a personal firewall can do
• Stop hackers from accessing your computer
• Protects your personal information
• Blocks “pop up” ads and certain cookies
• Determines which programs can access the
Internet
What a SYS firewall can do
• Authorizing users
• Limiting access for the services
• Filtering the packets
• NATing
• Masquerading
Requirements
• Linux Kernel 2.4.x or higher
• iptables
• Perl 5.6 or higher
• dialog
User interface with “dialog”
dialog --title “Linux dialog utility infobox”
--backtitle “Linux shell script tutorial”
--infobox “This is a dialog box called infobox,
which is used to show information on the
screen, Thanks to Savio Lam and Stuart
Herbert to give us this utility. Press any key…”
7 50;
Implementing iptables
• Using Perl and dialog I build a GUI version of
the iptables.
Perl – For coding purpose
dialog – For Graphical User Interface
How does it work?
• Step 1 – Run the application (perl sys.xls)
• Step 2 – Check required packages
• Step 3 – Authenticate User (password)
• Step 4 – Main Interface
• Step 5 – Customize rules
Dropping all policies
• iptables -P INPUT DROP
• iptables -P OUTPUT DROP
• iptables -P FORWARD DROP
Block Ping
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j DROP
A dynamic approach
# iptables -A INPUT -m state --state
ESTABLISHED,RELATED -j ACCEPT
# iptables -P INPUT DROP
# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
SNAT
• For static connections.
• iptables -t nat -A POSTROUTING -o eth0 -j
SNAT --to-source <SERVER'S_EXTERNAL_IP>
Masquerade
• For dynamic connections.
• iptables -t nat -A POSTROUTING -o ppp0 -j
MASQUERADE
DNAT
• iptables -t nat -A PREROUTING -i ppp0 -p tcp --
dport 80 -j DNAT --to-destination
192.168.1.24:80
Extra services
• Saving rules
• Logging
• Exit
THANK YOU!
Any Queries?

More Related Content

What's hot

[Wroclaw #8] IPMI appsec - an express train to hell
[Wroclaw #8] IPMI appsec - an express train to hell[Wroclaw #8] IPMI appsec - an express train to hell
[Wroclaw #8] IPMI appsec - an express train to hell
OWASP
 
How we breach small and medium enterprises (SMEs)
How we breach small and medium enterprises (SMEs)How we breach small and medium enterprises (SMEs)
How we breach small and medium enterprises (SMEs)
NCC Group
 

What's hot (20)

Kali linux and some features [view in Full screen mode]
Kali linux and some features [view in Full screen mode]Kali linux and some features [view in Full screen mode]
Kali linux and some features [view in Full screen mode]
 
Kali linux
Kali linuxKali linux
Kali linux
 
CNIT 123: Ch 9: Embedded Operating Systems: The Hidden Threat
CNIT 123: Ch 9: Embedded Operating Systems: The Hidden ThreatCNIT 123: Ch 9: Embedded Operating Systems: The Hidden Threat
CNIT 123: Ch 9: Embedded Operating Systems: The Hidden Threat
 
Kali linux summarised
Kali linux summarisedKali linux summarised
Kali linux summarised
 
Kali linux
Kali linuxKali linux
Kali linux
 
[Wroclaw #8] IPMI appsec - an express train to hell
[Wroclaw #8] IPMI appsec - an express train to hell[Wroclaw #8] IPMI appsec - an express train to hell
[Wroclaw #8] IPMI appsec - an express train to hell
 
Kalilinux
KalilinuxKalilinux
Kalilinux
 
CNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection SystemsCNIT 123: Ch 13: Network Protection Systems
CNIT 123: Ch 13: Network Protection Systems
 
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...
 
07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products
 
CNIT 123: 8: Desktop and Server OS Vulnerabilites
CNIT 123: 8: Desktop and Server OS VulnerabilitesCNIT 123: 8: Desktop and Server OS Vulnerabilites
CNIT 123: 8: Desktop and Server OS Vulnerabilites
 
Maemo 6 Platform Security
Maemo 6 Platform SecurityMaemo 6 Platform Security
Maemo 6 Platform Security
 
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
 
Essential Layers of IBM i Security: IBM i Security Configuration
Essential Layers of IBM i Security: IBM i Security ConfigurationEssential Layers of IBM i Security: IBM i Security Configuration
Essential Layers of IBM i Security: IBM i Security Configuration
 
CNIT 123: Ch 6: Enumeration
CNIT 123: Ch 6: EnumerationCNIT 123: Ch 6: Enumeration
CNIT 123: Ch 6: Enumeration
 
How we breach small and medium enterprises (SMEs)
How we breach small and medium enterprises (SMEs)How we breach small and medium enterprises (SMEs)
How we breach small and medium enterprises (SMEs)
 
Palo alto outline course | Mostafa El Lathy
Palo alto outline course | Mostafa El LathyPalo alto outline course | Mostafa El Lathy
Palo alto outline course | Mostafa El Lathy
 
Intoto Linley Tech Utm Architecture Presentation
Intoto Linley Tech Utm Architecture PresentationIntoto Linley Tech Utm Architecture Presentation
Intoto Linley Tech Utm Architecture Presentation
 
Mastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installationMastering checkpoint-1-basic-installation
Mastering checkpoint-1-basic-installation
 
NCS: NEtwork Control System Hands-on Labs
NCS:  NEtwork Control System Hands-on Labs NCS:  NEtwork Control System Hands-on Labs
NCS: NEtwork Control System Hands-on Labs
 

Similar to Firewall in Perl by Chankey Pathak

Quantum-grizzly-packet-filtering
Quantum-grizzly-packet-filteringQuantum-grizzly-packet-filtering
Quantum-grizzly-packet-filtering
Akihiro Motoki
 

Similar to Firewall in Perl by Chankey Pathak (20)

Database Firewall with Snort
Database Firewall with SnortDatabase Firewall with Snort
Database Firewall with Snort
 
Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1Security defined routing_cybergamut_v1_1
Security defined routing_cybergamut_v1_1
 
TTL Alfresco Product Security and Best Practices 2017
TTL Alfresco Product Security and Best Practices 2017TTL Alfresco Product Security and Best Practices 2017
TTL Alfresco Product Security and Best Practices 2017
 
Chapter 7 security tools i
Chapter 7   security tools iChapter 7   security tools i
Chapter 7 security tools i
 
OpenVINO introduction
OpenVINO introductionOpenVINO introduction
OpenVINO introduction
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
4.1-cnse-study-guide.pdf
4.1-cnse-study-guide.pdf4.1-cnse-study-guide.pdf
4.1-cnse-study-guide.pdf
 
Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
 
Powering up on power shell avengercon - 2018
Powering up on power shell   avengercon - 2018Powering up on power shell   avengercon - 2018
Powering up on power shell avengercon - 2018
 
Developer Day 2014 - 7 - andrew mitchell - legato
Developer Day 2014 - 7 - andrew mitchell - legatoDeveloper Day 2014 - 7 - andrew mitchell - legato
Developer Day 2014 - 7 - andrew mitchell - legato
 
Orion NTA Customer Training
Orion NTA Customer TrainingOrion NTA Customer Training
Orion NTA Customer Training
 
Intro ch 07_a
Intro ch 07_aIntro ch 07_a
Intro ch 07_a
 
Network Securities.pptx
Network Securities.pptxNetwork Securities.pptx
Network Securities.pptx
 
Quantum-grizzly-packet-filtering
Quantum-grizzly-packet-filteringQuantum-grizzly-packet-filtering
Quantum-grizzly-packet-filtering
 
Kali presentation
Kali presentationKali presentation
Kali presentation
 
Devicemgmt
DevicemgmtDevicemgmt
Devicemgmt
 
CCNA_Security_02.ppt
CCNA_Security_02.pptCCNA_Security_02.ppt
CCNA_Security_02.ppt
 
Security tools
Security toolsSecurity tools
Security tools
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Firewall in Perl by Chankey Pathak

  • 1. TRAINING REPORT ON SYS - FIREWALL Secure Your System A handy tool for System-Administrators Chandra Prakash Pathak 08EMTCS032 Computer Science Maharishi Arvind Institute of Engineering and Technology, Jaipur http://technostall.com
  • 2. Company Profile- Linux World • The best awarded Red Hat partner in India. • The company has been contributing a great deal to Linux Server & Networking industry by fulfilling its need for trained manpower in the field of Linux support, Networking, System Integration & Programming.
  • 3. GREEN-HORNE PROJECT (An open source operating system) Module: SYS Firewall
  • 4. What is a Firewall? A firewall is hardware, software, or a combination of both that is used to prevent unauthorized programs or Internet users from accessing a private network and/or a single computer.
  • 5. How does a software firewall work? • Inspects each individual “packet” of data as it arrives at either side of the firewall • Inbound to or outbound from your computer • Determines whether it should be allowed to pass through or if it should be blocked
  • 6. Firewall Rules • Allow – traffic that flows automatically because it has been deemed as “safe” (Ex. Meeting Maker, Eudora, etc.) • Block – traffic that is blocked because it has been deemed dangerous to your computer • Ask – asks the user whether or not the traffic is allowed to pass through
  • 7. What a personal firewall can do • Stop hackers from accessing your computer • Protects your personal information • Blocks “pop up” ads and certain cookies • Determines which programs can access the Internet
  • 8. What a SYS firewall can do • Authorizing users • Limiting access for the services • Filtering the packets • NATing • Masquerading
  • 9. Requirements • Linux Kernel 2.4.x or higher • iptables • Perl 5.6 or higher • dialog
  • 10. User interface with “dialog” dialog --title “Linux dialog utility infobox” --backtitle “Linux shell script tutorial” --infobox “This is a dialog box called infobox, which is used to show information on the screen, Thanks to Savio Lam and Stuart Herbert to give us this utility. Press any key…” 7 50;
  • 11.
  • 12. Implementing iptables • Using Perl and dialog I build a GUI version of the iptables. Perl – For coding purpose dialog – For Graphical User Interface
  • 13. How does it work? • Step 1 – Run the application (perl sys.xls) • Step 2 – Check required packages
  • 14. • Step 3 – Authenticate User (password)
  • 15. • Step 4 – Main Interface
  • 16. • Step 5 – Customize rules
  • 17. Dropping all policies • iptables -P INPUT DROP • iptables -P OUTPUT DROP • iptables -P FORWARD DROP
  • 18. Block Ping iptables -A INPUT -p icmp --icmp-type echo-request -j DROP iptables -A OUTPUT -p icmp --icmp-type echo-reply -j DROP
  • 19. A dynamic approach # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # iptables -P INPUT DROP # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  • 20. SNAT • For static connections. • iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source <SERVER'S_EXTERNAL_IP>
  • 21.
  • 22. Masquerade • For dynamic connections. • iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
  • 23. DNAT • iptables -t nat -A PREROUTING -i ppp0 -p tcp -- dport 80 -j DNAT --to-destination 192.168.1.24:80
  • 24. Extra services • Saving rules • Logging • Exit