Loading ...
Sorry, an error occurred while loading the content.

Re: Block Static ip in iptables - Need help

Expand Messages
  • Ahmed Sharif
    ... Server ( linux)  ----  Out side servers ( 10.x.x.x) ... access the out side server (10.x.x.x) ... Yusuf, you can add the following ip-tables rule on your
    Message 1 of 6 , Sep 29 3:56 AM
    • 0 Attachment
      --- In redhat@yahoogroups.com, Yusuf <visitvoice@...> wrote:
      >
      > Dear All,
      >  
      > I have problem to restrict in iptables for below option
      >  
      >  I want to block ip ( Local ip to access the server)
      >  
      >  
      > Local network ( 192.168.1.1 .. 192.168.1.10) ---- Local internet
      Server ( linux)  ----  Out side servers ( 10.x.x.x)
      >  
      > We are connecting outside servers through internet server
      >  
      > My problem is local internet server should block 192.168.1.5 to
      access the out side server (10.x.x.x)
      >  
      > Please help me
      >  
      >  
      > Yusuf

      Yusuf, you can add the following ip-tables rule on your local internet
      server.

      iptables -I INPUT -s 192.168.1.5 -d 10.0.0.0/255.0.0.0 -j DROP

      this will work for all protocol. If you want to block specific
      protocol (i.e web, ssh, ftp) then you can add a rule like this

      iptables -I INPUT -p tcp --dport 80 -s 192.168.1.5 -d
      10.0.0.0/255.0.0.0 -j DROP


      Thanks
      Ahmed Sharif
      Jr Unix Admin
      Therap BD
      Bangladesh
    • vijay sridhar
            Dear All,           in have a linux Server in which oracle is Installed . in that server i need to increse the swap space. my ram size 1.5Gbut
      Message 2 of 6 , Oct 1, 2008
      • 0 Attachment
         
         
          Dear All,
         
                in have a linux Server in which oracle is Installed . in that server i need to increse the swap space. my ram size 1.5Gbut swap space is 1.5 G.b. so i am facing perforamce problem,
         
         now how to increase the Swap Space using command.
         
        /data 40G Free Sapce
        /       5G  Free Space 
         
         Thanks in Advance.
         
         Regards
         
         S.Vijay


        Be the first one to try the new Messenger 9 Beta! Go to http://in.messenger.yahoo.com/win/

        [Non-text portions of this message have been removed]
      • ram_bilas_v1
        well, create partition using fdisk command u can do something like this... i suppose u have unpartitioned space in ur Hard Disk be it /dev/hda or /dev/sda
        Message 3 of 6 , Oct 1, 2008
        • 0 Attachment
          well,

          create partition using fdisk command u can do something like this...
          i suppose u have unpartitioned space in ur Hard Disk be it /dev/hda
          or /dev/sda

          #fdisk /dev/hda
          use /dev/sda in case u have SATA or SCSI hard Disk
          press 'n' to create a new partition
          press enter once
          then enter the size in format like '+1500M' this will be ur extra
          size of swap partition you need


          then t
          select the latest partition u have created. this should be a numeric
          input

          enter 82

          then finall press w to save the changes to fdisk

          # partprobe
          #mkswap /dev/hda? the partition number use /dev/sda/ in case SATA
          or SCSI

          #swapon /dev/hda?


          to mount the swap permanently edit the fstab file

          #vi /etc/fstab
          add the following entry

          /dev/hda? swap swap defaults 0 0

          save & Exit

          #mount -o remount -a

          #top

          or

          free
          you can now see the extended swap





          --- In redhat@yahoogroups.com, vijay sridhar <vijaysridhar03@...>
          wrote:
          >
          >  
          >  
          >   Dear All,
          >  
          >         in have a linux Server in which oracle is
          Installed . in that server i need to increse the swap space. my ram
          size 1.5Gbut swap space is 1.5 G.b. so i am facing perforamce problem,
          >  
          >  now how to increase the Swap Space using command.
          >  
          > /data 40G Free Sapce
          > /       5G  Free Space 
          >  
          >  Thanks in Advance.
          >  
          >  Regards
          >  
          >  S.Vijay
          >
          >
          > Be the first one to try the new Messenger 9 Beta! Go to
          http://in.messenger.yahoo.com/win/
          >
          > [Non-text portions of this message have been removed]
          >
        • Cameron Simpson
          ... If your disc partition already fill your disc (likely) then you probably want to make a swap file. See man mkswap for creating one and man swapon for
          Message 4 of 6 , Oct 1, 2008
          • 0 Attachment
            On 01Oct2008 19:26, vijay sridhar <vijaysridhar03@...> wrote:
            | in have a linux Server in which oracle is Installed . in that server
            | i need to increse the swap space. my ram size 1.5Gbut swap space is 1.5
            | G.b. so i am facing perforamce problem,
            |  now how to increase the Swap Space using command.
            |  
            | /data 40G Free Sapce
            | /       5G  Free Space 

            If your disc partition already fill your disc (likely) then you
            probably want to make a swap file. See "man mkswap" for creating one
            and "man swapon" for using it immediately and "man fstab" for using it
            automatically on boot.

            However, if you have 1.5GB of RAM and are already using your 1.5GB
            of existing swap, then you have serious performance problems already.
            Adding more swap will do NOTHING to solve your performance problems,
            though it may let your system continue to function (badly) where before
            it may run out of VM and kill oracle.

            You really need more RAM. Go and ready this wikipedia article:

            http://en.wikipedia.org/wiki/Thrash_(computer_science)

            Cheers,
            --
            Cameron Simpson <cs@...> DoD#743
            http://www.cskk.ezoshosting.com/cs/

            A fool learns from his mistakes, a wise man from someone elses.
            - Chris Snowdon <csnowdon@...>
          • senthil kumar
                        first use swapoff..then use mkswap and then edit fstab,then use mount -a  (use man page for further or use redhat inbuild documentation
            Message 5 of 6 , Oct 2, 2008
            • 0 Attachment
                   
                    first use swapoff..then use mkswap and then edit fstab,then use mount -a  (use man page for further or use redhat inbuild documentation its havning so many ways to simplify like this type of technical issues )...for this type issue u can create swap by logically during installtion if u have low main memory..it is very easy method incase of to increse swap or virtual memory space.

              -Senthil Kumar.S


              --- On Thu, 2/10/08, Cameron Simpson <cs@...> wrote:
              From: Cameron Simpson <cs@...>
              Subject: [redhat] Re: creating Swap Space
              To: redhat@yahoogroups.com
              Date: Thursday, 2 October, 2008, 4:33 AM











              On 01Oct2008 19:26, vijay sridhar <vijaysridhar03@ yahoo.co. in> wrote:

              | in have a linux Server in which oracle is Installed . in that server

              | i need to increse the swap space. my ram size 1.5Gbut swap space is 1.5

              | G.b. so i am facing perforamce problem,

              |  now how to increase the Swap Space using command.

              |  

              | /data 40G Free Sapce

              | /       5G  Free Space 



              If your disc partition already fill your disc (likely) then you

              probably want to make a swap file. See "man mkswap" for creating one

              and "man swapon" for using it immediately and "man fstab" for using it

              automatically on boot.



              However, if you have 1.5GB of RAM and are already using your 1.5GB

              of existing swap, then you have serious performance problems already.

              Adding more swap will do NOTHING to solve your performance problems,

              though it may let your system continue to function (badly) where before

              it may run out of VM and kill oracle.



              You really need more RAM. Go and ready this wikipedia article:



              http://en.wikipedia .org/wiki/ Thrash_(computer_science)



              Cheers,

              --

              Cameron Simpson <cs@...> DoD#743

              http://www.cskk ezoshosting. com/cs/



              A fool learns from his mistakes, a wise man from someone elses.

              - Chris Snowdon <csnowdon@wmc. ac.uk>

























              Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.