[CentOS] OT: virtual host for apache/tomcat servers

2011-03-29 Thread James Pifer
I hope someone here can answer my question so I don't have to join
another mailing list, on too many as it is...

I have the following installed:
httpd-2.2.3-43.el5.centos.3
tomcat5-5.5.23

I have a small jsp app that I can hit through apache like:

http://www.mydomain.com/tomcat/myapp.jsp

So tomcat in the url above is the apache proxy address for the tomcat
server. 

I want to setup a virtual host in apache to automatically load this app
if I type:

http://myapp.mydomain.com

I'm having trouble figuring this out. If I try to setup a virtual host,
apache complains that /tomcat is not a valid DocumentRoot. Looking at
tons of docs, but not seeing the solution. 

Any help is appreciated. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] TCP/IP Port Relay

2008-04-24 Thread James Pifer
On Thu, 2008-04-24 at 17:27 +0300, Vahur Jõesalu wrote:
> hmm, if I understood you correctly, then this should work just fine (on 
> linux firewall):
> 
> /sbin/iptables -t nat -I PREROUTING -p tcp --dport 23 -j DNAT \
> --to telnetserverip:port-number
> /sbin/iptables -I FORWARD -i external_interface -o internal_interface \ 
> -p tcp -d telnetserverip --dport portnumberontelnetserver -j ACCEPT
> 
> after a reboot or firewall service restart it's gone again.
> 
> -vahur

Sorry to jump in on someone else's thread, but... How do you do this if
the interface you want to use is a virtual? Meaning it's eth0:1 for
example? The -i parameter will not let you use that. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] syslog question

2008-07-29 Thread James Pifer
I have a 64bit centos 5.2 system. My router supports sending logs to a
syslog server, so I was hoping to send them to my centos box so they are
easier to keep an eye on. 

I've been googling for howto's etc, but I didn't think syslog would be
that difficult. Do I need to use syslog-ng or can I use the syslog
that's installed with centos 5.2?

Any suggestions or guidance?

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] syslog question

2008-07-29 Thread James Pifer
> James Pifer wrote:
> | I have a 64bit centos 5.2 system. My router supports sending logs to a
> | syslog server, so I was hoping to send them to my centos box so
> they are
> | easier to keep an eye on.
> |
> 
> On your CentOS box, edit /etc/sysconfig/syslog. The comments in the
> file should be sufficient.

Yeah, that was pretty easy. Any way to get it to save logs from
different hosts to specific files?

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] syslog question

2008-07-29 Thread James Pifer
On Tue, 2008-07-29 at 12:52 -0600, Milton Calnek wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> James Pifer wrote:
> | Yeah, that was pretty easy. Any way to get it to save logs from
> | different hosts to specific files?
> 
> You need rsyslog for that.
> I believe that FC9 has an rpm for it. There are other places to find
> one as well. KB may have one in his repo.
> 

Okay, I have rsyslog running and regular syslog stopped. Also
chkconfig'ed them. 

I added this to /etc/rsyslog.conf:
$template DynaFile,"/var/log/system-%HOSTNAME%.log"
*.* -?DynaFile

The log that gets created for my router is called:
system-Tue,.log

So I've been trying to modify it using a different propnames instead of
%HOSTNAME%. So far all I get for a result is:
system-**INVALID PROPERTY NAME**.log

In upper and lower case I've tried:
source
fromhost
fromhost-ip

Any suggestions? It's so close now!

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: Web "Project" type software

2009-07-15 Thread James Pifer
Sorry for the OT... I'm looking for some software to fill a fairly
specific set of requirements. I'm not necessarily looking for project
software, but it seems like the closest to match what I need. I'm also
not tied into open source or free. If anyone knows of any software that
might fill these requirements I would appreciate it. 

Here's what I'm looking for:

1) Web enabled application
2) File storage
- need to stare a large amount of large cad files
- be able to categorize file storage (not one large list)
- keep different revisions of files with some kind of notes
- be able to search files (at least include names in a search)
3) Task - assign and keep track of tasks (searchable)
4) Store meeting notes and minutes (searchable)
5) Would like to support LDAP
6) Extension on file storage - since we'll be storing a large files and
many of our users are across a WAN we'd like to sync/mirror the files to
a few different servers. I'm not sure how we'd control how the users get
the "closest" server but

I found dotproject on sourceforge. It fills some of the needs, but it's
file storage appears to be one large list, doesn't appear to support
LDAP, and I don't see much for searching. 

Anyone know of software that might do these things?

Thanks,
James



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: Web "Project" type software

2009-07-15 Thread James Pifer
On Wed, 2009-07-15 at 13:03 -0500, Neil Aggarwal wrote:
> James:
> 
> I wonder if you can do this in two pieces:
> 
> 1. Dotproject for the project management
> 2. Subversion for the file storage and revision
>   tracking.
> 
> Subversion has the ability to keep synchronized
> repositories in different locations.  You would
> have to write to the primary repository but can
> read from any of the synced repositories.  We host
> synced repos for our clients in our geographically
> separated data centers.
> 
> Then, it looks like all you would be missing would
> be the LDAP integration which someone could add to
> dotproject since it is open source.  We can probably
> develop that for you.
> 
>   Neil
> 

I will take a look at subversion. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: Web "Project" type software

2009-07-15 Thread James Pifer
On Wed, 2009-07-15 at 14:04 -0400, Ryan Pugatch wrote:
> 
> James Pifer wrote:
> > 
> > 1) Web enabled application
> > 2) File storage
> > - need to stare a large amount of large cad files
> > - be able to categorize file storage (not one large list)
> > - keep different revisions of files with some kind of notes
> > - be able to search files (at least include names in a search)
> > 3) Task - assign and keep track of tasks (searchable)
> > 4) Store meeting notes and minutes (searchable)
> > 5) Would like to support LDAP
> > 6) Extension on file storage - since we'll be storing a large files and
> > many of our users are across a WAN we'd like to sync/mirror the files to
> > a few different servers. I'm not sure how we'd control how the users get
> > the "closest" server but
> > 
> > I found dotproject on sourceforge. It fills some of the needs, but it's
> > file storage appears to be one large list, doesn't appear to support
> > LDAP, and I don't see much for searching. 
> > 
> > Anyone know of software that might do these things?
> > 
> > Thanks,
> > James
> > 
> > 
> > 
> 
> Have you considered using Wiki software such as PMWiki, Twiki, or 
> MediaWiki?  We do some of this with Twiki and use Apache's auth tied in 
> to LDAP.
> 
>   - Ryan Pugatch
>   Systems Administrator, TripAdvisor
>   BS/IT student, Northeastern University
> ___

Hadn't considered the wiki products. I will take a look at them. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] pop3 attack

2008-12-09 Thread James Pifer
I was looking at my maillog and it looks like someone is trying to get
into my pop3 server. 

Dec  9 15:28:54 mailserver dovecot: pop3-login: Aborted login: user=, 
method=PLAIN, rip=:::66.167.184.203, lip=:::192.168.1.2
Dec  9 15:29:08 mailserver dovecot: pop3-login: Aborted login: user=, 
method=PLAIN, rip=:::66.167.184.203, lip=:::192.168.1.2
Dec  9 15:29:14 mailserver dovecot: pop3-login: Aborted login: user=, 
method=PLAIN, rip=:::66.167.184.203, lip=:::192.168.1.2
Dec  9 15:29:18 mailserver dovecot: pop3-login: Aborted login: user=, 
method=PLAIN, rip=:::66.167.184.203, lip=:::192.168.1.2
Dec  9 15:29:36 mailserver dovecot: pop3-login: Aborted login: user=, 
method=PLAIN, rip=:::66.167.184.203, lip=:::192.168.1.2

How worried should I bee about this? Any suggestions for dealing with
it?

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2008-12-09 Thread James Pifer
Thanks to all. For now I've stopped it using iptables. I tried stopping
it at my router without success, yet another reason to replace it! I
will also report it to [EMAIL PROTECTED] 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2008-12-10 Thread James Pifer
On Tue, 2008-12-09 at 16:26 -0500, James Pifer wrote:
> Thanks to all. For now I've stopped it using iptables. I tried stopping
> it at my router without success, yet another reason to replace it! I
> will also report it to [EMAIL PROTECTED] 
> 

My issues have gotten worse. Apparently over the last few days my ip
address has gotten blacklisted. No idea why. Even though I have a
commercial class cable modem service, my ip is residential because it
comes to my house. But I've been running my mail server for several
years and never had an issue. 

I've tried adding these lines to my sendmailmc and rebuilding it, but
then nothing routes, not even local. 

define(`SMART_HOST',`smtp-server.carolina.rr.com')dnl
MASQUERADE_AS(carolina.rr.com)dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl

Now I'm using mailertable and that appears to be working. 

I'm not even sure this message with get to this list. Seems like I
haven't received any centos list mail in a while. I have on my other
lists though.

Any help is appreciated. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2008-12-10 Thread James Pifer
> so, using a roadrunner mail server as a "smarthost" is the only viable 
> choice
> 

I looked at it too. On PBL. So it's possible that Time Warner just
recently updated the list or something? 

Anyway, I tried setting up smarthost and was not able to get it to work,
but I was successful setting up mailertable for .com, .net, and .org so
these are being relayed through time warner's mail server. That should
cover most of it. 

I'm watching my maillog today and I don't see anything out of the
ordinary. 

James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2008-12-11 Thread James Pifer
> I think all the masquerade options are causing your problems. Just set the
> proper smarthost and restore the other options to what they were and then 
> test.
> 
> 

Scott, 

Thanks, removing the masquerade options did fix it. I'm back to using
smarthost instead of mailertable. Thanks.

Also, thanks to everyone that responded. 

James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: procmail recipe question

2009-02-02 Thread James Pifer
I'm trying to use procmail and I'm having trouble getting it to set some
headers. I have one mailing list that sets Newsgroups: in the header
and I want to remove it. I have the following test recipe:

:0
* ^Subject:.*\From j...@obrien-pifer.com  Mon Feb  2 11:43:03 2009
 Subject: testing
  Folder: formail -IMime-Version: -IContent-   1010


It looks like it's trying to put it in a folder starting with formail. I
tried putting the mail file on the next line (/var/mail/test), which is
the same way I do it on my kid's procmailrc's, but it seems to ignore
it. Where does procmail get the LASTFOLDER thing from?

Anyone know what I'm doing wrong?

Thanks,
James



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: procmail recipe question

2009-02-02 Thread James Pifer
Thanks, that worked. 

James

On Mon, 2009-02-02 at 16:55 +0100, Paul Bijnens wrote:
> On 2009-02-02 16:45, James Pifer wrote:
> > I'm trying to use procmail and I'm having trouble getting it to set some
> > headers. I have one mailing list that sets Newsgroups: in the header
> > and I want to remove it. I have the following test recipe:
> > 
> > :0
> > * ^Subject:.*\ > * ^(Mime-Version:|Content-)
> > | formail -IMime-Version: -IContent-
> > 
> > If I understand it correctly, it should remove the Mime-Verion and
> > Content headers.
> > 
> > The recipe gets matched but then doesn't deliver correctly:
> > 
> > procmail: Match on "^Subject:.*\ > procmail: Match on "^(Mime-Version:|Content-)"
> > procmail: Executing "formail,-IMime-Version:,-IContent-"
> > procmail: Assigning "LASTFOLDER=formail -IMime-Version: -IContent-"
> > procmail: Notified comsat: "test@:/home/jep/formail -IMime-Version: 
> > -IContent-"
> >>From j...@obrien-pifer.com  Mon Feb  2 11:43:03 2009
> >  Subject: testing
> >   Folder: formail -IMime-Version: -IContent-   
> > 1010
> > 
> > 
> > It looks like it's trying to put it in a folder starting with formail. I
> > tried putting the mail file on the next line (/var/mail/test), which is
> > the same way I do it on my kid's procmailrc's, but it seems to ignore
> > it. Where does procmail get the LASTFOLDER thing from?
> > 
> > Anyone know what I'm doing wrong?
> 
> 
> Add the "f" flag to your recipe, to indicate the receipt is a filter,
> and not a destination.
> 
>   :0 f
>   ...rest or recipe...
> 

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Mail delivery failing with 450

2009-03-07 Thread James Pifer
I'm not sure why this started, but apparently I'm having a DNS problem.
Yesterday mail started bouncing with this error:
450 Unable to find obrien-pifer.com

I think the messages eventually get delivered, but not sure. I guess
I'll see if this one makes the list. 

I checked my domain using http://www.checkdns.net/ and it gives me a
couple warnings. One is that there's no MX record, but there is. 

I use a smarthost for sending mail. 

My DNS records are: http://www.obrien-pifer.com/mydns.txt

Anyone see any problems in my DNS records?

Thanks,
James



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Mail delivery failing with 450

2009-03-07 Thread James Pifer
On Sat, 2009-03-07 at 14:01 +0100, Joebstl Thomas wrote:
> Hi James,
> 
> MX-records must point to A-records and not to IP adresses.
> A "dig -t AXFR obrien-pifer.com @ns1.obrien-pifer.com | grep MX" returns:
> mail.obrien-pifer.com.  38400   IN  MX  1 
> 70.62.90.185.obrien-pifer.com.
> 
> Whereas you list "mail.obrien-pifer.com.INMX1 70.62.90.185" 
> in your config.
> 
> So your setup is invalid because:
> - you're pointing your one and only MX record directly to an IP
> - since it is interpreted as host and missing a "." at the end it's 
> expanded to "70.62.90.185.obrien-pifer.com." which doesnt exist
> - it's a MX record for mail.obrien-pifer.com and not obrien-pifer.com
> 
> Your whole definition of the MX record looks goofy to me, dont want to 
> sound like an a.. but you better (re)read some tutorials on setting up DNS.
> I really wonder if you receive the reply at all.
> 
> Regards,
> Thomas


Thomas,

Can you tell me if it looks better now?

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Mail delivery failing with 450

2009-03-07 Thread James Pifer
> $ whois obrien-pifer.com
> ...
>Domain Name: OBRIEN-PIFER.COM
>Registrar: WILD WEST DOMAINS, INC.
>Whois Server: whois.wildwestdomains.com
>Referral URL: http://www.wildwestdomains.com
>Name Server: NS1.OBRIEN-PIFER.COM
>Name Server: NS2.OBRIEN-PIFER.COM
> 
>Server Name: NS1.OBRIEN-PIFER.COM
>IP Address: 70.62.90.185
>Registrar: WILD WEST DOMAINS, INC.
>Whois Server: whois.wildwestdomains.com
>Referral URL: http://www.wildwestdomains.com
> 
> 
>Server Name: NS2.OBRIEN-PIFER.COM
>IP Address: 70.62.90.185
>Registrar: WILD WEST DOMAINS, INC.
>Whois Server: whois.wildwestdomains.com
>Referral URL: http://www.wildwestdomains.com
> 
> 
> 
> I'm surprised the registrar let you register two HOST names for the same 
> IP, they aren't supposed to do that.

I removed the other two NS records. I also raised the TTL as suggested. 

Thanks for all the help. 

James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2009-03-13 Thread James Pifer
> The masquerading options are for a different purpose.
> I'm glad you got it sorted out.


Although I'm able to send mail to most people without a problem using
smarthost, I still have a few that bounce back with errors like:
Your message was rejected by mail.lance.com for the following reason:

 Service unavailable; Client host [cdptpa-omtalb.mail.rr.com] blocked by 
zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=70.62.90.185

I'm using the smarthost server that I should be using according to the 
information:
define(`SMART_HOST',`smtp-server.carolina.rr.com')dnl

Although I'm in a residential IP range, my connection is Business Class, so 
sending smtp mail is not restricted (at least contractually). 

Why would I still have this problem if I'm using smarthost? Is there a way to 
resolve it?

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2009-03-13 Thread James Pifer
> The problem has nothing to do with the Smart host server entry.
> 
> Read the information in the URL above and contact your ISP.
> 

I understand the problem is I'm in a residential range of dynamic IP,
even though I have commercial class, and I DID read the information in
the URL. That's how I verified I am using the right host for smarthost. 

>From the site:

Outbound Email Policy of Time Warner Cable/Road Runner for this IP
range:

It is the policy of Time Warner Cable/Road Runner to share with other
entities lists of our dynamic IP address space. While Time Warner
Cable/Road Runner does not presently forbid customers from sending out
mail directly from such space, it recognizes that others may wish to
refuse mail from such space, and so Time Warner Cable/Road Runner makes
that space known to others to facilitate their enforcement of their
policies. Customers finding their mail refused by others due to a PBL
listing should send their outbound mail through the outbound mail server
designated for them;


So this sounds like smarthost. So if it has nothing to do with
smarthost, is there a work around for it? The mail is being sent through
the ISP's mail server, but the destination mail server is refusing it
based on the domain name lookup? Why doesn't the other mail server see
it being delivered by the ISP's server and accept it?

I talked to Time Warner support. First guy I talked to gives me the
standard line that they don't support linux and he's never heard of
sendmail. Ugh!

I finally argued to get the call escalated. This person asked what host
I was sending through and felt like that should work. He is going to
request the IP get removed from the PBL, but I'm not liking my
chances

RR charges you an extra $50/mo for static ip! I don't have many other
choices for a decent high speed connection. DSL is too slow in my area. 

James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] pop3 attack

2009-03-14 Thread James Pifer
> I use zen.spamhaus.org on my server, so you're welcome to send a test 
> message directly to me off list and see if it bounces or not (you will 
> get greylisted first for 60 seconds)

Sent a test message. Here's what's in maillog:
Mar 14 11:00:28 mailserver sendmail[25108]: n2EF0LTt025094: 
to=, ctladdr= (503/503), 
delay=00:00:07, xdelay=00:00:03, mailer=relay, pri=120391, 
relay=smtp-server.carolina.rr.com. [75.180.132.33], dsn=2.0.0, stat=Sent 
(Message received: 
20090314134107.mzqs7442.cdptpa-omta01.mail.rr@mailserver.obrien-pifer.com)

Been several minutes and no bounce. Guess that's a good thing. 

> It shouldn't if everything is configured correctly. As I said above, to 
> me it looks more like the receiving server is misconfigured. That might 
> be intentional, who knows, but they will get FPs as a result from anyone 
> like yourself who correctly relays mail through their ISP.

That would stink, but appears to be the case. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] [OT] Playing mp4's on centos httpd

2012-11-27 Thread James Pifer
Sorry for the off topic, but hoping someone here can point me in a 
direction and end my endless googling... I have some mp4 training videos 
that our users need to be able to download or stream directly to their 
browser.

I have the h.264 module loaded on httpd on centos (using 
http://swimminginthought.com/streaming-mp4-video-webserver-solved/#).

So I think I have most of the infrastructure in place, but I'm not sure 
how to setup the streaming for all browsers. Do I need to embed some 
type of player? Like a flash player? Do browsers, Firefox and IE,. 
already have a player I can make use of?

Any help or direction here is appreciated.

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] [OT] Playing mp4's on centos httpd

2012-11-27 Thread James Pifer
On 11/27/2012 7:23 PM, John R Pierce wrote:
> On 11/27/12 4:04 PM, James Pifer wrote:
>> Sorry for the off topic, but hoping someone here can point me in a
>> direction and end my endless googling... I have some mp4 training videos
>> that our users need to be able to download or stream directly to their
>> browser.
>>
>> I have the h.264 module loaded on httpd on centos (using
>> http://swimminginthought.com/streaming-mp4-video-webserver-solved/#).
>>
>> So I think I have most of the infrastructure in place, but I'm not sure
>> how to setup the streaming for all browsers. Do I need to embed some
>> type of player? Like a flash player? Do browsers, Firefox and IE,.
>> already have a player I can make use of?
>>
>> Any help or direction here is appreciated.
> give VLC a try?   It usually plays almost anything.
>
>
>

Thanks, but I need this to be seamless for my users.

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] [OT] Playing mp4's on centos httpd

2012-11-27 Thread James Pifer
On 11/27/2012 8:02 PM, Patrick Lists wrote:
> On 11/28/2012 01:04 AM, James Pifer wrote:
>> Sorry for the off topic, but hoping someone here can point me in a
>> direction and end my endless googling... I have some mp4 training videos
>> that our users need to be able to download or stream directly to their
>> browser.
>>
>> I have the h.264 module loaded on httpd on centos (using
>> http://swimminginthought.com/streaming-mp4-video-webserver-solved/#).
>>
>> So I think I have most of the infrastructure in place, but I'm not sure
>> how to setup the streaming for all browsers. Do I need to embed some
>> type of player? Like a flash player? Do browsers, Firefox and IE,.
>> already have a player I can make use of?
> It seems with the info/code from http://videojs.com/ you should be able
> to offer streaming videos to your users. Another popular option is
> flowplayer: http://flowplayer.org/ Either way I guess you will need to
> create a web page that offers the training videos.
>
> Regards,
> Patrick
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Thanks. I think videojs.com might do the trick and appears to be free.

James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: Script Help

2013-05-18 Thread James Pifer
Sorry for the off topic, but don't a better resource. I'm not great at 
scripting, but need a quick script to modify a file.

I have a long file that has lines like this:

some text
some text2
CN=DATA.OU=XYZ.O=CO
some text3
some text4

And this repeats, but XYZ changes. "DATA" is always called data. (it's 
being renamed basically)

I need to change the middle line but leave the rest of the file as is 
like this:

some text
some text2
CN=XYZ_DATA.OU=XYZ.O=CO
some text3
some text4

Anyone know a quick way to do this? Any help is appreciated.

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: Script Help

2013-05-18 Thread James Pifer
On 5/18/2013 3:23 PM, Larry Martell wrote:
> On Sat, May 18, 2013 at 1:15 PM, James Pifer  wrote:
>> Sorry for the off topic, but don't a better resource. I'm not great at
>> scripting, but need a quick script to modify a file.
>>
>> I have a long file that has lines like this:
>>
>> some text
>> some text2
>> CN=DATA.OU=XYZ.O=CO
>> some text3
>> some text4
>>
>> And this repeats, but XYZ changes. "DATA" is always called data. (it's
>> being renamed basically)
>>
>> I need to change the middle line but leave the rest of the file as is
>> like this:
>>
>> some text
>> some text2
>> CN=XYZ_DATA.OU=XYZ.O=CO
>> some text3
>> some text4
>>
>> Anyone know a quick way to do this? Any help is appreciated.
> cat file | sed -e's/CN=DATA.OU=\(.*\)\.O=CO/CN=\1_DATA.OU=\1.O=CO/'
Larry,

Thanks for the answer. Still having trouble making it work. Been looking 
at sed for the last two hours. Let me give a specific example of a few 
lines I would want to change:

Let's say my original lines are:
CN=DATA.OU=XYZ.O=CO
CN=DATA.OU=XYY.OU=MEM.O=CO
CN=DATA.OU=XZZ.OU=OOP.O=CO

I want them to look like:
CN=XYZ_DATA.OU=XYZ.O=CO
CN=XYY_DATA.OU=XYY.OU=MEM.O=CO
CN=XZZ_DATA.OU=XZZ.OU=OOP.O=CO

So I need to take the data after the FIRST OU and stick in front of DATA 
with an _ in between. The rest of the line then remains the same.

Hope it makes sense. Appreciate the help!

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: Script Help

2013-05-19 Thread James Pifer
On 5/19/2013 9:03 AM, Larry Martell wrote:
> On Sat, May 18, 2013 at 6:31 PM, James Pifer  wrote:
>> On 5/18/2013 3:23 PM, Larry Martell wrote:
>>> On Sat, May 18, 2013 at 1:15 PM, James Pifer  wrote:
>>>> Sorry for the off topic, but don't a better resource. I'm not great at
>>>> scripting, but need a quick script to modify a file.
>>>>
>>>> I have a long file that has lines like this:
>>>>
>>>> some text
>>>> some text2
>>>> CN=DATA.OU=XYZ.O=CO
>>>> some text3
>>>> some text4
>>>>
>>>> And this repeats, but XYZ changes. "DATA" is always called data. (it's
>>>> being renamed basically)
>>>>
>>>> I need to change the middle line but leave the rest of the file as is
>>>> like this:
>>>>
>>>> some text
>>>> some text2
>>>> CN=XYZ_DATA.OU=XYZ.O=CO
>>>> some text3
>>>> some text4
>>>>
>>>> Anyone know a quick way to do this? Any help is appreciated.
>>> cat file | sed -e's/CN=DATA.OU=\(.*\)\.O=CO/CN=\1_DATA.OU=\1.O=CO/'
>> Larry,
>>
>> Thanks for the answer. Still having trouble making it work. Been looking
>> at sed for the last two hours. Let me give a specific example of a few
>> lines I would want to change:
>>
>> Let's say my original lines are:
>> CN=DATA.OU=XYZ.O=CO
>> CN=DATA.OU=XYY.OU=MEM.O=CO
>> CN=DATA.OU=XZZ.OU=OOP.O=CO
>>
>> I want them to look like:
>> CN=XYZ_DATA.OU=XYZ.O=CO
>> CN=XYY_DATA.OU=XYY.OU=MEM.O=CO
>> CN=XZZ_DATA.OU=XZZ.OU=OOP.O=CO
>>
>> So I need to take the data after the FIRST OU and stick in front of DATA
>> with an _ in between. The rest of the line then remains the same.
>>
>> Hope it makes sense. Appreciate the help!
> sed only does greedy matching, so you'll have to move to a more modern
> tool. I'd do this in python. Something like this:
>
> import re, sys
>
> pattern  = re.compile('^(CN=)(DATA\.OU)(.*?)(\..*$)')
>
> for path in sys.argv:
>  with open(path, 'r') as fh:
>  for line in fh:
>  line = line.strip()
>  match = pattern.match(line)
>  if match:
>  print
> match.group(1)+match.group(3)+'_'+match.group(2)+match.group(3)+match.group(4)
>  else:
>  print line
>
> When I run that with your input I get your desired output.
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Thanks Larry! I was able to get it working!!!

James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] surveillance DVR

2013-07-31 Thread James Pifer
> Ok, I *must* not have made clear what I was asking for. Let me try one
> more time
>
> We want an appliance, such as
> ,
> that we can put on our network, and manage, and d/l videos for long-term
> storage, onto a server. We have exactly, um, two? boxes running Windows,
> and we normally do *nothing* with them. We've over 100 servers running
> Linux, and that's where we live.
>
> Currently, the USB cameras are connected to ->CENTOS SERVERS<-, no WinCrap
> at all. We use the standard package motion to record for surveillance.
> We're looking for an "appliance", like the link I give above, that we can
> manage the same way that we manage an HP printer, which does *NOT* require
> IE, and we can do with firefox, or probably even konqueror. At the very
> least, we want to use, say, wget, to d/l the videos.
>
> NOTHING RUNNING WINDOWS
>
> Now, if I can calm myself down, have I made it clear what it is we're
> looking for? If so, can anyone recommend a source for such an appliance?
>
>  mark
>

Not knowing if / how much you're willing to spend, take a look at a 
Synology NAS, which has Surveillance Station. You get one camera license 
with each one and then you have to buy additional camera licenses for 
about $55 each.

Of course you'd be getting a lot more than just a surveillance DVR, so 
may or may not fit your needs. They are great devices.

Good luck,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] - monitoring software

2013-10-18 Thread James Pifer
On 10/18/2013 7:04 PM, Gordon Messmer wrote:
> On 10/18/2013 06:48 AM, Rodrigo Pichiñual Norin wrote:
>> Nagios is software that performs all your looking.
> ..except graphing.  Graphing is done with external components, and is
> typically a *lot* of work.
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
You can also consider Centreon, which is a frontend for Nagios. They 
also have a VM appliance which is prebuilt. Nice if you are starting 
from scratch. I won't say it makes things super easy, but does help if 
you want to use nagios and don't want to deal with manually editing conf 
files.

Free support is a bit lacking for Centreon. Sometimes you get help, 
sometimes you don't, but it's worth a look.

HTH
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] bind (named) compromised?

2014-02-08 Thread James Pifer
I'm having problems where my upstream bandwidth is being saturated. I've 
narrowed it down to a DNS issue of some type. If I stop the named 
service then my bandwidth drops to "normal" according to my untangle 
firewall.

I'm running bind-9.3.6-20.P1.el5_8.6.

I'm seeing the following in /var/log/messages:
2014-02-08T23:03:09.558315-05:00 mailserver named[3497]: network 
unreachable resolving 'hccforums.nl/ANY/IN': 2a00:1188:5::212#53
2014-02-08T23:03:09.558441-05:00 mailserver named[3497]: network 
unreachable resolving 'hccforums.nl/ANY/IN': 2001:7b8:606::85#53
2014-02-08T23:03:10.008926-05:00 mailserver named[3497]: client 
174.128.253.163#5209: view external: no more recursive clients: quota 
reached
2014-02-08T23:03:11.001878-05:00 mailserver named[3497]: client 
173.234.39.133#5209: view external: no more recursive clients: quota reached
2014-02-08T23:03:12.000487-05:00 mailserver named[3497]: client 
173.234.39.133#5209: view external: no more recursive clients: quota reached
2014-02-08T23:03:13.000820-05:00 mailserver named[3497]: client 
173.234.39.133#5209: view external: no more recursive clients: quota reached
2014-02-08T23:03:14.001501-05:00 mailserver named[3497]: client 
192.126.118.105#5209: view external: no more recursive clients: quota 
reached
2014-02-08T23:03:15.005720-05:00 mailserver named[3497]: client 
192.126.118.105#5209: view external: no more recursive clients: quota 
reached

I've tried changing the following in /etc/named.conf but it doesn't seem 
to have any affect so I commented them back out.
tcp-clients 1000;
recursive-clients 1;

I also see a chroot directory, but if I grep for named it doesn't appear 
to be using the chroot(?):
# ps aux | grep named
named 3497  0.4  0.7 170088 15836 ?Ssl  23:02   0:02 
/usr/sbin/named -u named
root  3763  0.0  0.0  61192   764 pts/1S+   23:13   0:00 grep named

I've also tried adding the following to iptables, but it also seems to 
have no affect:
iptables --insert INPUT -p udp --dport 53 -m string --from 40 --to 56 
--algo bm --hex-string '|09686363666f72756d73026e6cff|' -j DROP -m 
comment --comment "DROP DNS Q hccforums.nl"

Any suggestions or troubleshooting advice?

Much appreciated.
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: missing /dev paths

2014-03-12 Thread James Pifer
Looking for help kind of in a hurry. I've been searching google but not 
finding any options.

Is there any way to fix missing /dev paths to luns without rebooting?

For example, see the output from lsscsi below. The only way I know to 
fix this is with a reboot, but I REALLY Need to avoid that if possible.

Thanks
James


[2:0:1:150]  diskDataCore Virtual Disk DCS   -
[2:0:1:151]  diskDataCore Virtual Disk DCS   -
[2:0:1:152]  diskDataCore Virtual Disk DCS   -
[2:0:1:153]  diskDataCore Virtual Disk DCS   -
[2:0:1:154]  diskDataCore Virtual Disk DCS   /dev/sdic
[2:0:1:155]  diskDataCore Virtual Disk DCS   -
[2:0:1:156]  diskDataCore Virtual Disk DCS   -
[2:0:1:157]  diskDataCore Virtual Disk DCS   -
[2:0:1:158]  diskDataCore Virtual Disk DCS   -
[2:0:1:159]  diskDataCore Virtual Disk DCS   /dev/sdid
[2:0:1:160]  diskDataCore Virtual Disk DCS   /dev/sdie
[2:0:1:161]  diskDataCore Virtual Disk DCS   -
[2:0:1:162]  diskDataCore Virtual Disk DCS   -
[2:0:1:163]  diskDataCore Virtual Disk DCS   -
[2:0:1:164]  diskDataCore Virtual Disk DCS   -
[2:0:1:165]  diskDataCore Virtual Disk DCS   /dev/sdif
[2:0:1:166]  diskDataCore Virtual Disk DCS   /dev/sdig
[2:0:1:167]  diskDataCore Virtual Disk DCS   /dev/sdih
[2:0:1:168]  diskDataCore Virtual Disk DCS   /dev/sdii
[2:0:1:169]  diskDataCore Virtual Disk DCS   /dev/sdij
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: missing /dev paths

2014-03-12 Thread James Pifer
On 3/12/2014 9:18 PM, Steven Tardy wrote:
> rescan-scsi-bus.sh?
>
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html
>

Tried that, as well as "rescan-scsi-bus.sh --forcerescan", as well as a 
"rescan-scsi-bus.sh -i"

None of them make a difference.

Thanks
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: missing /dev paths

2014-03-12 Thread James Pifer
On 3/12/2014 9:18 PM, Steven Tardy wrote:
> rescan-scsi-bus.sh?
>
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html
>

So far the only thing that I found to work is to remove the path from 
the SAN side, then rescan, then readd, then rescan.

Unfortunately there are way too may bad paths to really make that a 
viable option.

Thanks
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: missing /dev paths

2014-03-12 Thread James Pifer
On 3/12/2014 9:18 PM, Steven Tardy wrote:
> rescan-scsi-bus.sh?
>
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html
>

I think I found a solution. For each incorrect disk run:
echo "scsi remove-single-device 2 0 0 40" > /proc/scsi/scsi

Then run:
rescan-scsi-bus.sh
multipath -F;multipath

Thanks
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Removing LVM

2012-04-09 Thread James Pifer
I have a CentOS 5 machine in which I'm trying to remove lvm. I dd'ed the
file system to another partition, then dd'ed it back overwriting the lvm
partition. I then modified menu.lst and fstab and replaced the paths to
point to the correct device. 

When the system boots it's still looking for lvm. I can restore the
system back to where it was with lvm, but I'm not sure what step I'm
missing to stop the system from looking for lvm. 

I started following this url:
http://daniel-albuschat.blogspot.com/2008/02/converting-lvm-to-normal-partition.html

Any suggestions?

Thanks,
James




___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Removing LVM

2012-04-10 Thread James Pifer
On Tue, 2012-04-10 at 04:59 +0200, Markus Falb wrote:
> On 10.4.2012 02:42, James Pifer wrote:
> > I have a CentOS 5 machine in which I'm trying to remove lvm. I dd'ed the
> > file system to another partition, then dd'ed it back overwriting the lvm
> > partition. I then modified menu.lst and fstab and replaced the paths to
> > point to the correct device. 
> > 
> > When the system boots it's still looking for lvm. I can restore the
> > system back to where it was with lvm, but I'm not sure what step I'm
> > missing to stop the system from looking for lvm. 
> 
> Extract the initrd, edit the init script (I do not remember the name)
> and compress initrd again. I had to this some time ago after renaming a
> Volume Group. There is some lvm stuff hardcoded in this script.

Markus, 

Thank you for the suggestion. I'm very close, I think. I used the
instructions here for working with initrd's script:
http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/

I'm still having a problem booting up. I can't seem to figure out what
the proper settings should be in initrd. When I boot I get:

.
Loading dmmemcache.ko module
Loading dmregion_hash.ko module
Loading dmmessage.ko module
Loading dmraid45.ko module
devicemapper: dmraid45: initialized v0.2594l
Waiting for driver initialization.
Scanning and configuring dmraid supported devices
Trying to resume from /dev/sda2
Unable to access resume device (/dev/sda2)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem ’/dev/root’
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic  not syncing: Attempted to kill init!


Here are my relevant files:
fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xea6c011f

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   *  63  208844  104391   83  Linux
/dev/sda2  208845 4401809 2096482+  82  Linux swap / Solaris
/dev/sda3 44018104612261420860402+  83  Linux


fstab:
/dev/sda3   /   ext3defaults1 1
#LABEL=//   ext3defaults
1 1
LABEL=/boot /boot   ext3defaults1 2
tmpfs   /dev/shmtmpfs   defaults0 0
devpts  /dev/ptsdevpts  gid=5,mode=620  0 0
sysfs   /syssysfs   defaults0 0
proc/proc   procdefaults0 0
/dev/sda2   swapswapdefaults0 0


menu.lst:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE:  You have a /boot partition.  This means that
#  all kernel and initrd paths are relative to /boot/, eg.
#  root (hd0,0)
#  kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#  initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/ces.xpm.gz
hiddenmenu
title CentOS (2.6.18-274.17.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.17.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-274.17.1.el5.img
title CentOS (2.6.18-274.3.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.3.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-274.3.1.el5.img
title Centreon Enterprise Server (2.6.18-194.3.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-194.3.1.el5.img


initrd init:
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/urandom c 1 9
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6

[CentOS] Tomcat5 with Oracle/Sun jdk on CentOS 5.8

2012-05-21 Thread James Pifer
I know this question could be asked on tomcat or possibly other mailing
lists, but I'm hoping I can get some help here instead of joining yet
another list.

I'm running tomcat5 on CentOS 5.8. I'm trying to setup Oracle/Sun java
rather than icedtea. I've installed the latest jdk 1.7 and setup
alternatives on centos for java and javac:

# java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)


I've also set /etc/tomcat5/tomcat5.conf to point JAVA_HOME to this jdk.

When I try to start tomcat5 I get:

Starting tomcat5: /usr/bin/rebuild-jar-repository: error: Could not find 
jdbc-stdext Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Could not find jndi Java extension for 
this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for 
this jvm
/usr/bin/rebuild-jar-repository: error: Could not find jaas Java extension for 
this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for 
this jvm
   [  OK  ]
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
/usr/bin/dtomcat5: line 343: /usr/lib/jvm/java/bin/java: No such file or 
directory
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
/usr/bin/dtomcat5: line 321: /usr/lib/jvm/java/bin/java: No such file or 
directory


I've been searching google all morning and haven't found a solution. I'd
be willing to try jdk 1.5 or 1.6 if that is the fix, but I'm doubting
that's the fix. 

I'm also not sure where tomcat5 set JRE_HOME. Been searching and can't
find it. 

Anyone here know how to resolve this?

Any assistance is appreciated. 

Thanks,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Tomcat5 with Oracle/Sun jdk on CentOS 5.8

2012-05-21 Thread James Pifer
On Mon, 2012-05-21 at 16:20 +0100, Lars Hecking wrote:
> > I'm also not sure where tomcat5 set JRE_HOME. Been searching and can't
> > find it. 
>  
>  Maybe you should look for JAVA_HOME ...
> 
>  /etc/init.d/tomcat5
>  /etc/tomcat5/tomcat5.conf
>  /etc/sysconfig/tomcat5
> 
>  That's all I can say - while I got tomcat4 running on RHEL3, and tomcat6
>  on CentOS6, I have a bit of a gap when it comes to CentOS5 and tomcat5,
>  although the differences between 5 and 6 are much less than between 4 and 5.

Lars, 

/etc/sysconfig/tomcat5 was it. 

Thank you,
James

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] OT: forwarding SNMP traps

2012-09-28 Thread James Pifer
Can anyone here give me a hand with forwarding snmp traps? I'm looking at 
Zenoss and I 
want to see how it handles snmp traps. We currently have snmp traps getting 
sent to two 
servers. One of them is basically ignoring the traps, but I can't just change 
the ip address (to 
give to Zenoss) because of other things the host is doing.

So instead I'd like to simply forward the snmp traps to the new zenoss system. 
I've tried a 
couple different forwarding programs, like jredirect and a python script I 
found while 
searching. I use jredirect to forward some other things, but I'm guessing it 
doesn't like udp.

I've also tried figuring out snmptrapd and snmpd without any success at all. 

Last, I tried simply using iptables with something like:
# iptables -t nat -A PREROUTING -i eth0 -p udp -m udp --dport 162 -j DNAT 
--to-destination 
192.168.1.3:162
# iptables -A INPUT -i eth0 -p udp -m udp --dport 162 -j ACCEPT

But that doesn't seem to work either. 

I can see running wireshark on both systems that the old server is receiving 
traps, but they 
are never getting forwarded to the zenoss system. 

Anyone here know how to do it? Any assistance is appreciated. 

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] lost udp packets

2012-10-04 Thread James Pifer
I have a CentOS release 5.8 that has snmp traps being sent to it. I've 
been trying to forward the snmp traps to another system. I've tried 
forwarding with snmpd/snmptrapd, iptables, and some forwarding programs. 
I can see snmp traps getting delivered to the system with tcpdump and 
wireshark, but no matter what app I run, the traps do not appear to be 
reaching the application or port 162. It seems like the packets are 
possibly being dropped right away.

iptables is wide open:

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source   destination

Chain FORWARD (policy ACCEPT)
target prot opt source   destination

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination

If I run the apps I can see port 162 open and closed depending on what I 
have running, so I'm sure there's not a specific app running already on 
that port.

Anyone have any ideas on what could be happening to these packets and 
why they might not be reaching port 162 on this host?

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] lost udp packets

2012-10-04 Thread James Pifer
On 10/4/2012 9:40 AM, James Pifer wrote:
> I have a CentOS release 5.8 that has snmp traps being sent to it. I've
> been trying to forward the snmp traps to another system. I've tried
> forwarding with snmpd/snmptrapd, iptables, and some forwarding programs.
> I can see snmp traps getting delivered to the system with tcpdump and
> wireshark, but no matter what app I run, the traps do not appear to be
> reaching the application or port 162. It seems like the packets are
> possibly being dropped right away.
>
> iptables is wide open:
>
> # iptables -L
> Chain INPUT (policy ACCEPT)
> target prot opt source   destination
>
> Chain FORWARD (policy ACCEPT)
> target prot opt source   destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source   destination
>
> If I run the apps I can see port 162 open and closed depending on what I
> have running, so I'm sure there's not a specific app running already on
> that port.
>
> Anyone have any ideas on what could be happening to these packets and
> why they might not be reaching port 162 on this host?
>


Just a follow up. I ran tcpdump for port 162 for a little while and when 
I stopped I see this at the end:

737 packets captured
737 packets received by filter
0 packets dropped by kernel

So I guess the kernel is not dropping them. Still can't explain why 
applications are not picking them up.

Any help is appreciated.

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] lost udp packets

2012-10-04 Thread James Pifer
> I'd try strace'ing the app that is supposed to be receiving them to
> see if the socket opens are working and what happens with a packet
> arrives on the port.
>


No idea what this means. snmptrapd keeps running (strace snmptrapd -f 
-Le -c /etc/snmp/snmptrapd.conf), but I see this over and over after the 
initial start:

gettimeofday({1349372532, 120897}, NULL) = 0
gettimeofday({1349372532, 120917}, NULL) = 0
gettimeofday({1349372532, 120934}, NULL) = 0
gettimeofday({1349372532, 120950}, NULL) = 0
select(9, [3 5 7 8], [], [], {5, 0})= 0 (Timeout)
gettimeofday({1349372537, 120615}, NULL) = 0
gettimeofday({1349372537, 120637}, NULL) = 0
gettimeofday({1349372537, 120655}, NULL) = 0
gettimeofday({1349372537, 120670}, NULL) = 0
gettimeofday({1349372537, 120686}, NULL) = 0
gettimeofday({1349372537, 120703}, NULL) = 0
gettimeofday({1349372537, 120721}, NULL) = 0
gettimeofday({1349372537, 120737}, NULL) = 0
select(9, [3 5 7 8], [], [], {5, 0})= 0 (Timeout)
gettimeofday({1349372542, 119701}, NULL) = 0
gettimeofday({1349372542, 119726}, NULL) = 0
gettimeofday({1349372542, 119744}, NULL) = 0
gettimeofday({1349372542, 119760}, NULL) = 0
gettimeofday({1349372542, 119776}, NULL) = 0
gettimeofday({1349372542, 119794}, NULL) = 0
gettimeofday({1349372542, 119813}, NULL) = 0
gettimeofday({1349372542, 119829}, NULL) = 0
select(9, [3 5 7 8], [], [], {5, 0})= 0 (Timeout)
gettimeofday({1349372547, 118753}, NULL) = 0
gettimeofday({1349372547, 118777}, NULL) = 0
gettimeofday({1349372547, 118794}, NULL) = 0
gettimeofday({1349372547, 118811}, NULL) = 0
gettimeofday({1349372547, 118827}, NULL) = 0
gettimeofday({1349372547, 118844}, NULL) = 0
gettimeofday({1349372547, 118862}, NULL) = 0
gettimeofday({1349372547, 118878}, NULL) = 0
select(9, [3 5 7 8], [], [], {0, 1760}) = 0 (Timeout)
gettimeofday({1349372547, 120727}, NULL) = 0
gettimeofday({1349372547, 120745}, NULL) = 0
gettimeofday({1349372547, 120761}, NULL) = 0
gettimeofday({1349372547, 120777}, NULL) = 0
gettimeofday({1349372547, 120793}, NULL) = 0
gettimeofday({1349372547, 120809}, NULL) = 0
send(7, "\1\r\0\0\r\0\0\0\0\0\0\0\307\203\225!\0\0\0\0", 20, 0) = 20
gettimeofday({1349372547, 120884}, NULL) = 0
gettimeofday({1349372547, 120908}, NULL) = 0
gettimeofday({1349372547, 120929}, NULL) = 0
select(9, [3 5 7 8], NULL, NULL, {0, 1}) = 1 (in [7], left {0, 1})
getsockname(7, {sa_family=AF_FILE, path=@""}, [2]) = 0
recv(7, "\1\22\0\0\r\0\0\0\0\0\0\0\307\203\225!\10\0\0\0K9\0\0\0\0\0\0", 
65536, 0) = 28

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] lost udp packets

2012-10-04 Thread James Pifer
On 10/4/2012 1:56 PM, m.r...@5-cent.us wrote:
> James Pifer wrote:
>>> I'd try strace'ing the app that is supposed to be receiving them to
>>> see if the socket opens are working and what happens with a packet
>>> arrives on the port.
>>>
>>
>> No idea what this means. snmptrapd keeps running (strace snmptrapd -f
>> -Le -c /etc/snmp/snmptrapd.conf), but I see this over and over after the
>> initial start:
>>
>> gettimeofday({1349372532, 120897}, NULL) = 0
>> gettimeofday({1349372532, 120917}, NULL) = 0
>> gettimeofday({1349372532, 120934}, NULL) = 0
>> gettimeofday({1349372532, 120950}, NULL) = 0
>> select(9, [3 5 7 8], [], [], {5, 0})= 0 (Timeout)
> 
> Do you have ntp running on all the servers?
>
>mark
>
> _

Not necessarily. SNMP traps are coming from all different kinds of 
devices. I can't imagine wrong times would mess up snmptrpd. Are you 
thinking that's what it's having a problem with?

Even if I try to just to a udp forward, with socat, iptables, or a 
couple specific forwarding apps I tried, nothing seems to get to the apps.

I might just try restarting this server during the night. Maybe 
something is just hosed.

Any other ideas?

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] lost udp packets

2012-10-04 Thread James Pifer
On 10/4/2012 2:52 PM, Les Mikesell wrote:
> On Thu, Oct 4, 2012 at 12:45 PM, James Pifer  wrote:
>> No idea what this means. snmptrapd keeps running (strace snmptrapd -f
>> -Le -c /etc/snmp/snmptrapd.conf), but I see this over and over after the
>> initial start:
>>
>> recv(7, "\1\22\0\0\r\0\0\0\0\0\0\0\307\203\225!\10\0\0\0K9\0\0\0\0\0\0",
>> 65536, 0) = 28
> Do you know what it was receiving here?
>

Difficult tell as a lot of snmp traps are received.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] [SOLVED] Re: lost udp packets

2012-10-05 Thread James Pifer
Reboot didn't help, but modifying my snmpd.conf and adding "master 
agentx" did the trick. Apparantly snmpd was quietly denying snmptrapd 
from connecting. Just happened to come across the suggestion.

Now I need to figure out how to have the traps forwarded but retain the 
real source of the trap.

Thanks for the help.

James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] [SOLVED] Re: lost udp packets

2012-10-07 Thread James Pifer
On 10/7/2012 4:03 AM, Gordon Messmer wrote:
> On 10/05/2012 11:53 AM, James Pifer wrote:
>> Now I need to figure out how to have the traps forwarded but retain the
>> real source of the trap.
> If you want to forward the traps without modifying the source address on
> the UDP packet, you'll need to use iptables.  Add a DNAT rule to the
> PREROUTING chain in the nat table.
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
I was able to add the following to snmptrad.conf and the source address 
stays:

format1 '%B [%b]: Trap %#v\n
format2 '%B [%b]: Trap %#v\n

Thanks,
James
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Disabling Firewall/iptables on CentOS 7??

2017-03-22 Thread James Pifer
I apologize if this has been asked and answered, but I googled and 
attempted things for several hours today without success.


I have a freshly installed CentOS 7 system that I'd like to disable the 
firewall and all iptables rules. Basically the equivalent of doing 
iptables -F


In a nutshell I've tried the following commands, in many different ways 
and orders, but when the system restarts it still seems to end up with 
some form of default rules. It even has a couple rules specifying 
192.168.122.0 and I can't figure out where it's coming from.


#Disable Firewall
systemctl stop firewalld
systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
systemctl disable firewalld
systemctl stop firewalld
iptables --flush
iptables --list
iptables -L
yum install iptables-services
service iptables save
systemctl enable iptables
service iptables save

Any help is appreciated.

Thanks
James
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Disabling Firewall/iptables on CentOS 7??

2017-03-24 Thread James Pifer

On 3/24/2017 3:16 AM, Łukasz Posadowski wrote:

Data Wed, 22 Mar 2017 19:56:03 -0400
James Pifer  wrote:


I apologize if this has been asked and answered, but I googled and
attempted things for several hours today without success.

Iptables isn't used by default, at least not directly. Easiest way to
do dosable firewall is:
# systemctl mask firewalld
and restart the machine.

192.168.122. subnet is something for libvirt and KVM. I have it
completely disabled on my locals and VPSes without any problem.

If You write specific rules in /etc/sysconfig/iptables
and /etc/sysconfig/ip6tables, with
-F
-X
-P INPUT DROP
at the beginning, any trace of 192.168.122 will be gone. Here's mine
ipv4 rules for my local machines:

*filter
-F
-X
-P INPUT DROP
-A INPUT -s 0/0 -m state --state RELATED,ESTABLISHED -j ACCEPT

# localhost
-A INPUT -i lo -j ACCEPT

# ping
-A INPUT -p icmp -j ACCEPT

# ssh
-A INPUT -s 192.168.234.0/24 -p tcp --dport 22 -j ACCEPT

COMMIT




Thanks for the help.

Basically I was making it more complex than it needed to be. Disabling 
firewalld and removing the libvirt NIC did the job.


Thanks
James
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos