Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/pdmenu
- ## Version: 2011-02-15
- ##
- ## By: Digital Foundations
- ## License: GPL
- ## Uses: dialog
- ##
- ## This menu is designed to give quick access to regular
- ## repetative tasks performed in the Linux (Debian) console.
- ##
- ## Changlog: 15/2/2012 - cleanup
- ## 2/2/2012 - rewrite
- ##
- # Save this file in /usr/local/bin
- # and chmod ugo+x /usr/local/bin/pdmenu.main
- #
- #Set a pleasing color scheme.
- color:desktop:blue:blue
- color:title:white:white
- color:base:white:white
- #this is a comment
- menu:iptables:Iptables:Select
- exec:_iptables-save:disp:iptables-save
- show:_INPUT (Incoming)::incoming
- show:_OUTPUT (Sending)::sending
- exec:_Flush (remove all rules):p:iptables -F; iptables -t nat -F; iptables -t mangle -F; iptables -P INPUT ACCEPT; iptables -P FORWARD ACCEPT; iptables -P OUTPUT ACCEPT
- nop
- show:Table - _Filter::filter
- show:Table - _Mangle::mangle
- show:Table - _NAT::nat
- show:Table - _Raw::raw
- nop:-----
- show:_Help::iptables-help
- exec:_Edit menu::nano /usr/local/bin/pdmenu.iptables
- menu:incoming
- show:_PREROUTING-Mangle::prerouting-mangle
- show:_PREROUTING-NAT(Port Forwarding)::prerouting-nat
- show:_INPUT-Filter(Local)::filter-input
- show:_FORWARD(Packets to forward)::filter-forwarding
- menu:prerouting-mangle
- exec:_List rules:disp:iptables -t mangle --list-rules
- exec:_List(PREROUTING only):disp:iptables -t mangle -L PREROUTING
- exec:_List(All):disp:iptables -t mangle -L
- exec:_Insert
- exec:_Remove
- menu:prerouting-nat
- exec:_List rules:disp:iptables -t nat --list-rules
- exec:_List(PREROUTING):disp:iptables -t nat -L PREROUTING
- exec:_List(All):disp:iptables -t nat -L
- exec:_Insert
- exec:_Remove
- menu:filter-input
- exec:_List rules:disp:iptables -t filter --list-rules
- exec:_List(INPUT):disp:iptables -t filter --list-rules INPUT
- exec:_List(All):disp:iptables -t filter --list-rules
- exec:_Insert::
- exec:_Remove::
- menu:filter-forwarding
- exec:_List rules:disp:iptables -t filter --list-rules
- exec:_List(FORWARD):disp:iptables -t filter -L FORWARD
- exec:_List(All):disp:iptables -t filter -L
- exec:_Insert:edit,p:iptables -t filter -I FORWARD -p ~Protocol?:tcp~ --dport ~DestinationPort?:~ -j ~Action?:ACCEPT~
- exec:_Remove
- menu:sending
- show:_Mangle,OUTPUT(Local host)::output-mangle
- show:_NAT (Local host)::output-nat
- show:_Filter,OUTPUT(Local host)::output-filter
- show:_NAT,POSTROUTING(Local + Forwarded)::postrouting-nat
- menu:output-mangle
- exec:_List:disp:iptables -t mangle --list-rules OUTPUT
- exec:_Insert::
- exec:_Remove::
- menu:output-nat
- exec:_List rules:disp:iptables -t nat --list-rules
- exec:_List OUTPUT:disp:iptables -t nat -L OUTPUT --line-numbers
- exec:_List All:disp:iptables -t nat -L --line-numbers
- exec:_Insert::
- exec:_Remove::
- menu:output-filter
- exec:_List:disp:iptables -t filter -L OUTPUT --line-numbers
- exec:_Insert::
- exec:_Remove::
- menu:postrouting-nat
- exec:_List All:disp:iptables -t nat -L --line-numbers
- exec:_List POSTROUTING:disp:iptables -t nat -L POSTROUTING --line-numbers
- exec:_Insert::
- exec:_Remove::
- menu:filter:Filter
- exec:_List rules:edit,disp:iptables -t filter --list-rules ~Chain?:~
- exec:_List:edit,disp:iptables -t filter --list ~Chain?:~
- exec:_Append::dialog --menu Protocol: 20 40 17 all o tcp o udp o udplite o icmp o esp o ah o sctp o;\
- dialog --form Details 20 60 17 \
- "Source address/mask " 1 1 "" 1 28 30 0 \
- "Destination address/mask " 2 1 "" 2 28 30 0 \
- "Jump target " 3 1 "" 3 28 30 0 \
- "Goto chain " 4 1 "" 4 28 30 0 \
- "In interface " 5 1 "" 5 28 30 0 \
- "Out interface " 6 1 "" 6 28 30 0;\
- iptables --append
- exec:_Delete::
- exec:_Insert::
- exec:_Replace::
- exec:_Chain..::
- menu:mangle:Mangle
- exec:_List rules:edit,disp:iptables -t mangle --list-rules ~Chain?:~
- exec:_List:edit,disp:iptables -t mangle --list ~Chain?:PREROUTING~
- exec:_Add::
- exec:_Edit::
- exec:_Remove::
- exec:_View::
- menu:nat
- exec:_List rules:disp,edit:iptables -t nat --list-rules ~Chain?:~
- exec:_List:disp,edit:iptables -t nat -L ~Chain?:~ --line-numbers
- menu:raw
- exec:_List rules:disp,edit:iptables -t nat --list-rules ~Chain?:~
- exec:_List:disp,edit:iptables -t nat -L ~Chain?:~ --line-numbers
- menu:iptables-help:Help
- exec:_About:disp:grep "^##" /usr/local/bin/pdmenu.iptables
- exec:_iptables::man iptables
- exec:_iptables-save::man iptables-save
- exec:_Version:disp:iptables --version
- nop
- exit:_Back to main menu..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement