Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread Mick Pollard
On Thu, 20 Aug 2009 11:09:07 +1000 (EST)
"Voytek Eymont"  wrote:

> how can I output a config file with only the valid directives, but not all
> the '#' commented lines ?
> 
> # cat /etc/sysconfig/iptables-config
> 
> # Load additional iptables modules (nat helpers)
> #   Default: -none-
> # Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
> # are loaded after the firewall rules are applied. Options for the helpers
> are
> # stored in /etc/modules.conf.
> IPTABLES_MODULES=""
> 
> 
> so to get only
> IPTABLES_MODULES=""
> ...
This is another way of doing it.
   grep ^[^#] file

It removes blank lines and lines starting with a #
It doesn't help with indented lines that start with a #



-- 
Regards
Mick Pollard ( lunix )

BOFH Excuse of the day:
Delayed Comms Stackdump Error




pgp1DUzM8vOzC.pgp
Description: PGP signature
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread Amos Shapira
2009/8/20 Craig Ayliffe :
> egrep -v "^#" /etc/sysconfig/iptables-config >
> /etc/sysconfig/iptables-config_tmp

A bit nicer way - to get rid of empty lines as well, is:

egrep -v '^(#|$)' /etc/sysconfig/iptables-config

Or:

egrep -v "^#" /etc/sysconfig/iptables-config | cat -s

to remove multiple blank lines from output. "| less -s" will get the
same effect.

Cheers,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] ftp client recomendations ?

2009-08-19 Thread Amos Shapira
2009/8/20 Voytek Eymont :
>> Bottom line, ftp is a pretty firewall un-friendly protocol.
>> I'd recommend sftp (i.e. the module/feature of ssh) instead.
>
>
> but, if command line ftp client works with no issues, doesn't that exclude
> firewall on the server ?
>
> the ftpd and fwall have been unmodified pretty well since 1st installed

Close.

The main possible difference I can see is the use of passive
connections - could be that one of them uses them and the other
doesn't and that could make the whole difference.

Try to make the clients more verbose, or sniff the traffic with
Wireshark (use "follow TCP connection" to get a very easy-to-read
trace of the command stream).

Cheers,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread Craig Ayliffe
On Thu, Aug 20, 2009 at 11:16 AM, David Gillies  wrote:

> Voytek Eymont wrote:
>
>> how can I output a config file with only the valid directives, but not all
>> the '#' commented lines ?
>>
>> # cat /etc/sysconfig/iptables-config
>>
>> # Load additional iptables modules (nat helpers)
>> #   Default: -none-
>> # Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'),
>> which
>> # are loaded after the firewall rules are applied. Options for the helpers
>> are
>> # stored in /etc/modules.conf.
>> IPTABLES_MODULES=""
>> 
>>
>> so to get only
>> IPTABLES_MODULES=""
>> ...
>>
>>
>>
> I'm sure there's nicer ways but this works for me:
>
> grep -v \# /etc/sysconfig/iptables-config
>


I wouldn't recommend this - in case you have comments at the end of a line
you will remove them as well - or if a "#" is part of the actual
command/text, ie:

 IPTABLES_MODULES=""# This is a comment
or even
 SECRET="ahash###"

Both of these would be removed from the output.

You need to specifiy the beginning of the line ie "^#"

Cheers,

-- 
Craig Ayliffe
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread David Gillies

Voytek Eymont wrote:

how can I output a config file with only the valid directives, but not all
the '#' commented lines ?

# cat /etc/sysconfig/iptables-config

# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers
are
# stored in /etc/modules.conf.
IPTABLES_MODULES=""


so to get only
IPTABLES_MODULES=""
...

  

I'm sure there's nicer ways but this works for me:

grep -v \# /etc/sysconfig/iptables-config
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread Norman Gaywood
On Thu, Aug 20, 2009 at 11:09:07AM +1000, Voytek Eymont wrote:
> how can I output a config file with only the valid directives, but not all
> the '#' commented lines ?
> 
> # cat /etc/sysconfig/iptables-config
> 
> # Load additional iptables modules (nat helpers)
> #   Default: -none-
> # Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
> # are loaded after the firewall rules are applied. Options for the helpers
> are
> # stored in /etc/modules.conf.
> IPTABLES_MODULES=""
> 
> 
> so to get only
> IPTABLES_MODULES=""

grep -v '^#' /etc/sysconfig/iptables-config

^ means beginning of the line
# mean #

-v means "everything except what matches"

-- 
Norman Gaywood, Computer Systems Officer
University of New England, Armidale, NSW 2351, Australia

ngayw...@une.edu.auPhone: +61 (0)2 6773 3337
http://mcs.une.edu.au/~normFax:   +61 (0)2 6773 3312

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] exclude commented lines from output ?

2009-08-19 Thread Craig Ayliffe
On Thu, Aug 20, 2009 at 11:09 AM, Voytek Eymont  wrote:

> how can I output a config file with only the valid directives, but not all
> the '#' commented lines ?
>
> # cat /etc/sysconfig/iptables-config
>
> # Load additional iptables modules (nat helpers)
> #   Default: -none-
> # Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
> # are loaded after the firewall rules are applied. Options for the helpers
> are
> # stored in /etc/modules.conf.
> IPTABLES_MODULES=""
> 
>
> so to get only
> IPTABLES_MODULES=""
> ...
>

egrep -v "^#" /etc/sysconfig/iptables-config >
/etc/sysconfig/iptables-config_tmp


-- 
Craig Ayliffe
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] exclude commented lines from output ?

2009-08-19 Thread Voytek Eymont
how can I output a config file with only the valid directives, but not all
the '#' commented lines ?

# cat /etc/sysconfig/iptables-config

# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers
are
# stored in /etc/modules.conf.
IPTABLES_MODULES=""


so to get only
IPTABLES_MODULES=""
...




-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] ftp client recomendations ?

2009-08-19 Thread Voytek Eymont

On Thu, August 20, 2009 10:37 am, Matthew Hannigan wrote:
> On Wed, Aug 19, 2009 at 11:18:48AM +1000, Daniel Pittman wrote:

>>> /etc/sysconfig/iptables
>>>
>>
>> H.  Does it have the nf_nat_ftp and nf_conntrack_ftp modules
>> loaded, too?

> Look in /etc/sysconfig/iptables-config for that.

Matt,
thanks, no modules specfied

so I should add IPTABLES_MODULES="nf_nat_ftp nf_conntrack_ftp"

-
IPTABLES_MODULES=""
IPTABLES_MODULES_UNLOAD="yes"
IPTABLES_SAVE_ON_STOP="no"
IPTABLES_SAVE_ON_RESTART="no"
IPTABLES_SAVE_COUNTER="no"
IPTABLES_STATUS_NUMERIC="yes"


>> I don't know, on RedHat.  I think they had /var/log/firewall or
>> something?
>
> They'll be in /var/log/messages

> Bottom line, ftp is a pretty firewall un-friendly protocol.
> I'd recommend sftp (i.e. the module/feature of ssh) instead.


but, if command line ftp client works with no issues, doesn't that exclude
firewall on the server ?

the ftpd and fwall have been unmodified pretty well since 1st installed


-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] ftp client recomendations ?

2009-08-19 Thread Matthew Hannigan
On Wed, Aug 19, 2009 at 11:18:48AM +1000, Daniel Pittman wrote:
.
.
.
> > /etc/sysconfig/iptables
> 
> H.  Does it have the nf_nat_ftp and nf_conntrack_ftp modules loaded, too?

Voytek,

Look in /etc/sysconfig/iptables-config for that.

> [...]
> 
> >>> Command:PASV
> >>> Response:227 Entering Passive Mode (116,197,145,51,175,75).
> >>>
> >>
> >> At this point the server *should* be expecting a connection from the
> >> client, on TCP/44875, but I bet the firewall isn't letting that through.
> >>
> >> Check your firewall logs first, to see if you have a record of blocking
> >> that connection or not.
> >
> > what log to look at?
> 
> I don't know, on RedHat.  I think they had /var/log/firewall or something?

They'll be in /var/log/messages


Bottom line, ftp is a pretty firewall un-friendly protocol.
I'd recommend sftp (i.e. the module/feature of ssh) instead.

Matt

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] [Fwd: [Advocate Play Ogg] Help us spread this article on Ogg Theora]

2009-08-19 Thread Marghanita da Cruz

FYI
--
Marghanita da Cruz
http://www.ramin.com.au
Phone: (+61)0414 869202
--- Begin Message ---
Hi everyone,

Last week I participated in the Ogg Theora book sprint put on by FLOSS
Manuals, and we just posted a new article to the FSF site about Ogg
Theora.

Can you help us share the article?

http://www.reddit.com/r/reddit.com/comments/9c5ym/working_with_ogg_theora_and_the_video_tag_whats/

http://digg.com/software/Ogg_Theora_what_s_working_what_s_needed_and_where_next

The manual we created topped out at over 200 pages on everything from
playback, to encoding, to publishing (including HTML5 video tag tricks)
and even subtitles. Check it out!

http://en.flossmanuals.net/TheoraCookbook/

Thanks!

-Holmes Wilson
FSF Campaigns Team



___
Advocate mailing list
advoc...@playogg.org
http://lists.gnu.org/mailman/listinfo/advocate

--- End Message ---
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

[SLUG] RE:Transferring iceape bookmarks

2009-08-19 Thread bill
My method, which I've just worked out again as I forgot what I'd done 
previously) when I want to set up Firefox and Thundrbird in a new 
install, is to copy the old installs /home/xxx/.mozilla ( or 
/home//.mozilla-thunderbird) to the /home// of the new install 
BEFORE running either Firefox or Thunderbird.


I then run ( in a terminal) sudo firefox-x.x ( ie firefox-3.5) 
-profilemanager ( or sudo thunderbird -profilemanager), which finds the 
copied user profile. Just accept it and then select "run" and it will 
set up everything and even download and install updated plugins etc.



Hope this helps - your Iceape should be included in all of this 
automatically I imagine.



Bill
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html