Results 1 to 2 of 2

Thread: Iptables

  1. #1
    Just burned his ISO
    Join Date
    Feb 2006
    Posts
    3

    Default Iptables

    Hey guys I may be posting this in the wrong area and if I am .. I apologize. I am currently using back track to audit some machines at work. I am trying to use IPtables to lockdown who has ssh access and vnc to this machine. Right now the VNC server only listens on localhost ...so if some one want to VNC to the machine they have to port forward using an ssh tunnel. I wanted to add another layer of security by allowing only my IP to ssh to the server using IPTables. I put the Iptable rule in then i did a IPTABLES-SAVE. I then did iptables -L and the rule was there..... I tried to ssh from a diffrent machine and it was blocking as expected. I then restarted the server. did a IP-Tables L and no rules are listed. however I can still reach the server and no one else can. Does anyone know where my rules went? They seem to still be working however they are not visable.

  2. #2
    Junior Member
    Join Date
    Jan 2006
    Posts
    26

    Default

    You could use a scipt for your rules. Just input your ip_table rules.
    Code:
    #!/bin/bash
    # Control IPTABLE rules
    
    # path to iptable
    IPTABLE_PATH=/bin
    
    # set interface
    IFACE=eth0
    
    # End of configuration
    
    
    
    case "$1" in
         start)
       # insert IPTABLE rules here
    
       ;;
    
         stop)
            # flush IPTABLE rules here
        
       ;;
         restart)
            # flush IPTABLE rule
            # Reset IPTABLE rules
               
       ;;
         *)
       echo 'usage: start - stop - restart'
       exit 1
       ;;
    esac
    exit 0
    ;;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •