Author Topic: iptables firewall  (Read 1380 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
iptables firewall
« on: 6 December 2002, 01:18 »
is there anyway to get the line number of errors in a bash script? i've looked through this script for a while looking for where this stuff is:
Code: [Select]
i picked up thios script from some website and modifed it, but does anyone see anything wrong with this script?:
Code: [Select]

[ December 05, 2002: Message edited by: The Master of Reality / B0B ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
iptables firewall
« Reply #1 on: 6 December 2002, 01:59 »
The variable EXTERNAL isn't declared.

Where you have lines like:

$IPTABLES -A INPUT -i $EXTERNAL -p tcp --dport swat -j DROP

you should presumably have $EXTERNALIF instead of $EXTERNAL
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
iptables firewall
« Reply #2 on: 6 December 2002, 02:37 »
I don't know what your goal is but if this is a RedHat machine (even if it isn't) I have found that webmin makes an outstanding iptables configurator. In RedHat as you know the iptables service script is /etc/init.d/iptables. That script can/will save your current iptables rules in a configuration file called /etc/sysconfig/iptables. It loads the rules from that table when you start the iptables service. Webmin is a nice graphical interface to configure the firewall. Be careful so you don't set a rule to shut you out of webmin though or you will have to go to the console to undo the rule that has blocked you out.

If you already know this stuff just ignore it. Maybe you have another reason to use a script for above/beyond type of configuration. The webmin way is nice, neat and clean and uses the system's predefined way of setting up your firewall.

[ December 05, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
iptables firewall
« Reply #3 on: 6 December 2002, 03:22 »
paranoia is my main reason, . my other reason is just for fun  

and as yu can see how i've set taht script that its not redhat.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
iptables firewall
« Reply #4 on: 6 December 2002, 05:44 »
Just because your paranoid, doesnt mean there not after you! -Nirvana

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
iptables firewall
« Reply #5 on: 6 December 2002, 08:03 »
your gonna be happy X11... i might actually restart my server to upgrade my hard drive and OS. The Bob Hub will only be down for hopefully less than 2 mintues
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
iptables firewall
« Reply #6 on: 6 December 2002, 16:44 »
And my server most likly will not be powered down until...
* I get cable and put in another net card.
* Power goes out
* I start respecting my hardware.

mor theres a better thing then restart:
# rm -rf /

or this:
# dd if=/dev/hda of=/dev/zero

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
iptables firewall
« Reply #7 on: 6 December 2002, 22:48 »
quote:
Originally posted by X11 / BOB: 3xtr4 skr1pty:

or this:
# dd if=/dev/hda of=/dev/zero



Got a little case of lexdysia there? I think you meant:

# dd if=/dev/zero of=/dev/hda

[ December 06, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
iptables firewall
« Reply #8 on: 6 December 2002, 23:21 »
i'm just swqitching hard drives. I wont be formatting it until i know that there is nothing essential that i forgot on there. THe Bb Hub will be down for about 2 mintues now
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Zombie9920

  • Member
  • **
  • Posts: 1,309
  • Kudos: 33
iptables firewall
« Reply #9 on: 7 December 2002, 23:23 »
Haha, I know of a way to keep the BoB Hub down for longer than 2 minutes. I'm not going into details though.  :D

[ December 07, 2002: Message edited by: Zombie9920 ]


Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
iptables firewall
« Reply #10 on: 8 December 2002, 05:40 »
Help us mor, he might eat our hats.

choasforages

  • VIP
  • Member
  • ***
  • Posts: 1,729
  • Kudos: 7
    • http://it died
iptables firewall
« Reply #11 on: 8 December 2002, 21:15 »
physical abuse to the server doens't count.
and neither does a DDoS attack
so put yer smurphing software away
x86: a hack on a hack of a hackway
alpha, hewlett packed it A-way
ppc: the fruity way
mips: the graphical way
sparc: the sunny way
4:20.....forget the DMCA for a while!!!

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
iptables firewall
« Reply #12 on: 9 December 2002, 21:49 »
to see a script execute; use "sh -x"

-t.
from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.


TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
iptables firewall
« Reply #13 on: 11 December 2002, 06:06 »
Does this make my server have the largest current uptime (BE QUIET VOID!!) on this board that uses that little uptime counting thing?