Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sat, Jun 25, 2011 at 2:41 PM, Always Learning  wrote:

>
>
> > Does anyone know how to determine which file system a disk was
> > formatted with, if fdisk -l doesn't show it?
>
> I would use gparted from the command line or from Gnome's /
> Applications / System Tools menu
>
> yum install gparted
>
>
> --
>
>
>



Thanx, I don't have a machine with X installed at my disposal right now,
only servers.


-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sat, Jun 25, 2011 at 3:16 PM, Robert Heller  wrote:

>
> If 'fdisk -l /dev/sda' does not show anything, either the disks were
> never partitioned or formatted, at least not as a bare drive. What kind
> of disk is this (I know it says USB above, but I am assuming these are
> bare disk(s) that you installed in a USB enclosure).
>
> It is *possible* these disks were part of a *hardware* RAID array, in
> which case only the hardware RAID would know how to deal with them
> (they would have some vendor-specific metadata / superblock on them
> somewhere).  If the disks are not partitularly large (< 1TB) if they
> were actually in use they would likely have a MS-DOS partition table
> (which fdisk -l would be displaying).  If they are larger disks they
> might have gpt partition table (parted would show this).  It is
> possible that they have a Solaris disk label (if they were in a Solaris
> machine).
>
> It is *possible* that someone used them as part of a Linux software
> RAID array using the whole disk, in which case there might be a MD
> superblock on them (mdadm might see it) and it is ALSO possible that
> they were part of a LVM volume group, also using the whole disk as a
> PV, in which case there should be LVM metadata on them (lvm might see
> this).
>
> If none of the above, they are just 'factory fresh', never used disks.
>
> --
>
>

All the drives are old 160GB SATA. There's 1x 160GB IDE as well.

They were used in the office on various machines, so no hardware RAID, but
they definitely had some data on them.
I did get some drives with software RAID on and could recover the data, but
there's 2 drives which I can't figure out what filesystem they have / had on
them.
We use Linux & FreeBSD, so I suspect they had ZFS / UFS on them, but
couldn't mount them on a FreeBSD server with ZFS or UFS either.


-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sat, Jun 25, 2011 at 6:49 PM, Robert Nichols
wrote:

> On 06/25/2011 06:46 AM, Rudi Ahlers wrote:
> > Hi all,
> >
> > Does anyone know how to determine which file system a disk was formatted
> with,
> > if fdisk -l doesn't show it?
> [snip]
> > I need to see what data is on a bunch of disks that I found in storage
> and would
> > prefer to first check if there's anything of use on them before I format
> them
>
> Running "file -s /dev/{some_partition}" will generally tell you something.
>
> --
> Bob Nichols "NOSPAM" is really part of my email address.
> Do NOT delete it.
>
> ___
>
>

It did:

[root@HP-DL360 ~]# file -s /dev/sda
/dev/sda: empty




-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sat, Jun 25, 2011 at 7:14 PM, Lamar Owen  wrote:

> On Saturday, June 25, 2011 07:46:01 AM Rudi Ahlers wrote:
> > Does anyone know how to determine which file system a disk was formatted
> > with, if fdisk -l doesn't show it?
>
> blkid -s TYPE
>
> On a C5 box here:
> [root@backup670 ~]# blkid -s TYPE
> /dev/mapper/vg_backup670-lv_root: TYPE="ext3"
> /dev/md1: TYPE="swap"
> /dev/md0: TYPE="ext3"
> /dev/sdb2: TYPE="swap"
> /dev/sdb1: TYPE="ext3"
> /dev/sda2: TYPE="swap"
> /dev/sda1: TYPE="ext3"
> /dev/hda: TYPE="iso9660"
> /dev/vg_backup670/lv_root: TYPE="ext3"
> /dev/mapper/pachy--mirror-home: TYPE="xfs"
> /dev/vg_opt/lv_pachy: TYPE="ext4"
> /dev/pachy-mirror/home: TYPE="xfs"
> /dev/mapper/vg_opt-lv_pachy: TYPE="ext4"
> [root@backup670 ~]#
>
> On a RHEL 6.1 box here:
> [root@www ~]# blkid -s TYPE
> /dev/sdd1: TYPE="LVM2_member"
> /dev/sde1: TYPE="LVM2_member"
> /dev/sdk1: TYPE="LVM2_member"
> /dev/sdn1: TYPE="xfs"
> /dev/sdg1: TYPE="ext4"
> /dev/sds1: TYPE="LVM2_member"
> /dev/sdy1: TYPE="LVM2_member"
> /dev/sdaa1: TYPE="ext4"
> /dev/sdag1: TYPE="linux_raid_member"
> /dev/sdx1: TYPE="LVM2_member"
> /dev/sdaf1: TYPE="linux_raid_member"
> /dev/sdad1: TYPE="ext3"
> /dev/sdah1: TYPE="ext4"
> /dev/sdah2: TYPE="LVM2_member"
> /dev/mapper/vg_www-lv_root: TYPE="ext4"
> /dev/mapper/vg_www-lv_swap: TYPE="swap"
> /dev/md127: TYPE="ext3"
> /dev/mapper/vg_bak2-lv_lobak: TYPE="ext4"
> [root@www ~]#
>
> Useful stuff.
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

wow, this is quite a neat trick!

But, it didn't help me much:



[root@HP-DL360 ~]# blkid -s TYPE
/dev/mapper/LVM-swap: TYPE="swap"
/dev/mapper/LVM-root: TYPE="ext3"
/dev/cciss/c0d0p1: TYPE="ext3"
/dev/LVM/root: TYPE="ext3"
/dev/LVM/swap: TYPE="swap"
/dev/mapper/LVM-data: TYPE="ext3"
[root@HP-DL360 ~]# fdisk -l /dev/sda
[root@HP-DL360 ~]#




Which filesystems can this command recognize? I checked the MAN page, but
couldn't find a list of filesystems that it's familiar with

-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread John R Pierce
On 06/26/11 12:58 AM, Rudi Ahlers wrote:
>
> All the drives are old 160GB SATA. There's 1x 160GB IDE as well.
>
> They were used in the office on various machines, so no hardware RAID, 
> but they definitely had some data on them.
> I did get some drives with software RAID on and could recover the 
> data, but there's 2 drives which I can't figure out what filesystem 
> they have / had on them.
> We use Linux & FreeBSD, so I suspect they had ZFS / UFS on them, but 
> couldn't mount them on a FreeBSD server with ZFS or UFS either.
>

is it possible you used the raw disk without partitioning?   so in 
linux, that would be /dev/sdb instead of /dev/sdb1 or whatever.


on a random server with normally partitioned disks...

# file -s /dev/sda
/dev/sda: x86 boot sector; partition 1: ID=0x83, active, starthead 1, 
startsector 63, 256977 sectors; partition 2: ID=0xfd, starthead 0, 
startsector 257040, 4192965 sectors; partition 3: ID=0xfd, starthead 0, 
startsector 4450005, 138914055 sectors, code offset 0x48

# file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)




-- 
john r pierceN 37, W 122
santa cruz ca mid-left coast

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


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sun, Jun 26, 2011 at 10:04 AM, John R Pierce  wrote:

> On 06/26/11 12:58 AM, Rudi Ahlers wrote:
> >
> > All the drives are old 160GB SATA. There's 1x 160GB IDE as well.
> >
> > They were used in the office on various machines, so no hardware RAID,
> > but they definitely had some data on them.
> > I did get some drives with software RAID on and could recover the
> > data, but there's 2 drives which I can't figure out what filesystem
> > they have / had on them.
> > We use Linux & FreeBSD, so I suspect they had ZFS / UFS on them, but
> > couldn't mount them on a FreeBSD server with ZFS or UFS either.
> >
>
> is it possible you used the raw disk without partitioning?   so in
> linux, that would be /dev/sdb instead of /dev/sdb1 or whatever.
>
>
> on a random server with normally partitioned disks...
>
> # file -s /dev/sda
> /dev/sda: x86 boot sector; partition 1: ID=0x83, active, starthead 1,
> startsector 63, 256977 sectors; partition 2: ID=0xfd, starthead 0,
> startsector 257040, 4192965 sectors; partition 3: ID=0xfd, starthead 0,
> startsector 4450005, 138914055 sectors, code offset 0x48
>
> # file -s /dev/sda1
> /dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
>
>
>
>
> --
> john r pierceN 37, W 122
> santa cruz ca mid-left coast
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

It's hard to say. They've been in the cupboard for along time and I don't
know which tech did what on them, which is why I'm trying to see which file
systems were on them last, so that I can see what data is on them.

-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread John R Pierce
On 06/26/11 1:11 AM, Rudi Ahlers wrote:
> It's hard to say. They've been in the cupboard for along time and I 
> don't know which tech did what on them, which is why I'm trying to see 
> which file systems were on them last, so that I can see what data is 
> on them.

well, if as you say...

> [root@HP-DL360 ~]# file -s /dev/sda
> /dev/sda: empty

I'm guessing the tech wiped them clean.  `dd if=/dev/zero of=/dev/sda 
bs=65536`  will do that nicely.





-- 
john r pierceN 37, W 122
santa cruz ca mid-left coast

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


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Keith Roberts
On Sun, 26 Jun 2011, Rudi Ahlers wrote:

> To: CentOS mailing list 
> From: Rudi Ahlers 
> Subject: Re: [CentOS] how do determine last file system on disk?
> 
> On Sun, Jun 26, 2011 at 10:04 AM, John R Pierce  wrote:
>
>> On 06/26/11 12:58 AM, Rudi Ahlers wrote:
>>>
>>> All the drives are old 160GB SATA. There's 1x 160GB IDE as well.
>>>
>>> They were used in the office on various machines, so no hardware RAID,
>>> but they definitely had some data on them.
>>> I did get some drives with software RAID on and could recover the
>>> data, but there's 2 drives which I can't figure out what filesystem
>>> they have / had on them.
>>> We use Linux & FreeBSD, so I suspect they had ZFS / UFS on them, but
>>> couldn't mount them on a FreeBSD server with ZFS or UFS either.
>>>
>>
>> is it possible you used the raw disk without partitioning?   so in
>> linux, that would be /dev/sdb instead of /dev/sdb1 or whatever.
>>
>>
>> on a random server with normally partitioned disks...
>>
>> # file -s /dev/sda
>> /dev/sda: x86 boot sector; partition 1: ID=0x83, active, starthead 1,
>> startsector 63, 256977 sectors; partition 2: ID=0xfd, starthead 0,
>> startsector 257040, 4192965 sectors; partition 3: ID=0xfd, starthead 0,
>> startsector 4450005, 138914055 sectors, code offset 0x48
>>
>> # file -s /dev/sda1
>> /dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
>>
>>
>>
>>
>> --
>> john r pierceN 37, W 122
>> santa cruz ca mid-left coast
>>
>> ___
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
> It's hard to say. They've been in the cupboard for along time and I don't
> know which tech did what on them, which is why I'm trying to see which file
> systems were on them last, so that I can see what data is on them.

What about using a spare low spec machine with removable 
EIDE and SATA drive caddies? This would come in handy for 
times like these, or if you needed to wipe a drive 
completely befroe disposal?

HTH

Keith Roberts

-
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sun, Jun 26, 2011 at 10:26 AM, Keith Roberts  wrote:

>
> >
> > It's hard to say. They've been in the cupboard for along time and I don't
> > know which tech did what on them, which is why I'm trying to see which
> file
> > systems were on them last, so that I can see what data is on them.
>
> What about using a spare low spec machine with removable
> EIDE and SATA drive caddies? This would come in handy for
> times like these, or if you needed to wipe a drive
> completely befroe disposal?
>
> HTH
>
> Keith Roberts
>
>
>
Keith, don't take this the wrong way, but you're going off the beaten track
here.


Whether the drives are attached to a motherboard, or USB disk caddy doesn't
change the file systems on them



-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Keith Roberts
On Sun, 26 Jun 2011, Rudi Ahlers wrote:

> To: CentOS mailing list 
> From: Rudi Ahlers 
> Subject: Re: [CentOS] how do determine last file system on disk?
> 
> On Sun, Jun 26, 2011 at 10:26 AM, Keith Roberts  wrote:
>
>>
>>>
>>> It's hard to say. They've been in the cupboard for along 
>>> time and I don't know which tech did what on them, which 
>>> is why I'm trying to see which
>> file
>>> systems were on them last, so that I can see what data is on them.
>>
>> What about using a spare low spec machine with removable
>> EIDE and SATA drive caddies? This would come in handy for
>> times like these, or if you needed to wipe a drive
>> completely befroe disposal?
>>
>> HTH
>>
>> Keith Roberts

> Keith, don't take this the wrong way, but you're going off 
> the beaten track here.
>
> Whether the drives are attached to a motherboard, or USB 
> disk caddy doesn't change the file systems on them

Absolutely. You did say they have been in a cupboard for 
some time, and using a spare machine with removable EIDE or 
SATA drive caddies would allow you to swap the EIDE or SATA 
drives quickly into the caddies for doing whatever you want 
to them, without having to fiddle about and install the 
drive permanently.

But as the job is almost done, I guess that's not important 
now?

Kind Regards,

Keith

-
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread John R Pierce
On 06/26/11 1:18 AM, John R Pierce wrote:
>> >  [root@HP-DL360 ~]# file -s /dev/sda
>> >  /dev/sda: empty
> I'm guessing the tech wiped them clean.

or they were spares for a raid system, never used.



-- 
john r pierceN 37, W 122
santa cruz ca mid-left coast

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


[CentOS] iptables port forwarding

2011-06-26 Thread muiz
Dear all,
  I would like to forward a port to an internet server, but failed. can you 
help me?
Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
Remote server:   IP: a.b.c.d  Port: 8181


Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward) -> a.b.c.d 
 Port: 8181
-
In Fedora, I successfully to config the firewall using system-config-firewall 
and iptables command:
1. Run system-config-firewall
 1.1 open local port 8080
 1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
2. echo 1 > /proc/sys/net/ipv4/ip_foward
3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp 
--dport 8181 -j MASQUERADE
That's all.




Thanks !

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


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Robert Heller
At Sun, 26 Jun 2011 09:58:16 +0200 CentOS mailing list  
wrote:

> 
> 
> 
> On Sat, Jun 25, 2011 at 3:16 PM, Robert Heller  wrote:
> 
> >
> > If 'fdisk -l /dev/sda' does not show anything, either the disks were
> > never partitioned or formatted, at least not as a bare drive. What kind
> > of disk is this (I know it says USB above, but I am assuming these are
> > bare disk(s) that you installed in a USB enclosure).
> >
> > It is *possible* these disks were part of a *hardware* RAID array, in
> > which case only the hardware RAID would know how to deal with them
> > (they would have some vendor-specific metadata / superblock on them
> > somewhere).  If the disks are not partitularly large (< 1TB) if they
> > were actually in use they would likely have a MS-DOS partition table
> > (which fdisk -l would be displaying).  If they are larger disks they
> > might have gpt partition table (parted would show this).  It is
> > possible that they have a Solaris disk label (if they were in a Solaris
> > machine).
> >
> > It is *possible* that someone used them as part of a Linux software
> > RAID array using the whole disk, in which case there might be a MD
> > superblock on them (mdadm might see it) and it is ALSO possible that
> > they were part of a LVM volume group, also using the whole disk as a
> > PV, in which case there should be LVM metadata on them (lvm might see
> > this).
> >
> > If none of the above, they are just 'factory fresh', never used disks.
> >
> > --
> >
> >
> 
> All the drives are old 160GB SATA. There's 1x 160GB IDE as well.
> 
> They were used in the office on various machines, so no hardware RAID, but
> they definitely had some data on them.
> I did get some drives with software RAID on and could recover the data, but
> there's 2 drives which I can't figure out what filesystem they have / had on
> them.
> We use Linux & FreeBSD, so I suspect they had ZFS / UFS on them, but
> couldn't mount them on a FreeBSD server with ZFS or UFS either.

Wondering: could these extra 2 drives have been 'spare' disks that were
never actually installed? And got mixed in with the 'used' drives?

It is also possible that the drives got 'wiped' somehow, eg they were
on the bottom shelf when the cleaning crew came by with the floor waxing
machine...

> 
> 

-- 
Robert Heller -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software-- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


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


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread Rudi Ahlers
On Sun, Jun 26, 2011 at 12:53 PM, Robert Heller  wrote:

>
> Wondering: could these extra 2 drives have been 'spare' disks that were
> never actually installed? And got mixed in with the 'used' drives?
>
>

I doubt it since there are quite a few drives that were part of a RAID set
and I could get some data from them.



> It is also possible that the drives got 'wiped' somehow, eg they were
> on the bottom shelf when the cleaning crew came by with the floor waxing
> machine...
>

No floor waxing or other "vibrating" machines come in this office.

So I guess the techs just completely wiped them for security or other
reasons. Unfortunately none of the guys remember.

But it's fine, I'll just salvage what I can from the other drives and then
resell these to someone else who can use them.



>
> >
> >
>
> --
> Robert Heller -- 978-544-6933 / hel...@deepsoft.com
> Deepwoods Software-- http://www.deepsoft.com/
> ()  ascii ribbon campaign -- against html e-mail
> /\  www.asciiribbon.org   -- against proprietary attachments
>
>
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Jumbo Frame performance or lackof?

2011-06-26 Thread Geoff Galitz


> I'm wondering, that since Jumbo Frames was supposed to be better for
> bulk transfers, why am I seeing these results? Is it the ElRepo
> drivers I used to enable higher MTUs or possibly some kind of oddity
> with the realtek NICs I am using? Or am I mistaken about the benefits
> of jumbo frames and that they are only beneficial in specific
> configurations, perhaps only with higher network speeds and enough
> packets at 1500 MTU to overwhelm packet handling hardware?


In short, the entire path from origin to destination must be configured to 
support jumbo frames.  If not, then the devices at various points in the 
path will attempt to scale and you'll end up getting fragmentation and 
higher overhead in the devices leading to worse overall performance.

Have you verified this is the case?

Of course, the quality of the driver for your NIC will also play a role.




 

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


Re: [CentOS] Jumbo frames problem with Realtek NICs?

2011-06-26 Thread Ljubomir Ljubojevic
Emmanuel Noobadmin wrote:
> Now the question is whether the overheads reduction, even at sub-10GBs
> speeds, may be significant if the host/guest are VMs instead of actual
> physical machines.

If you are going to use it on virtual interfaces, I would think it would 
  help, especially if you have greater number of VM's. If virtual 
interfaces can achieve greater/unlimited speed, this could even have 
greater impact on throughput itself.

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


Re: [CentOS] iptables port forwarding

2011-06-26 Thread Marian Marinov
On Sunday 26 June 2011 12:53:07 muiz wrote:
> Dear all,
>   I would like to forward a port to an internet server, but failed. can you
> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
> Remote server:   IP: a.b.c.d  Port: 8181
> 
> 
> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward) ->
> a.b.c.d  Port: 8181 -
> In Fedora, I successfully to config the firewall using
> system-config-firewall and iptables command: 1. Run system-config-firewall
>  1.1 open local port 8080
>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p
> tcp --dport 8181 -j MASQUERADE That's all.
> 
> 
> 
> 
> Thanks !
You have to use Destination NAT for the job:

iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to a.b.c.d:8181
echo 1 > /proc/sys/net/ipv4/ip_foward

If you have more then one IPs on the local machine its a good idea to specify 
the destination -d 192.168.1.250 

Marian


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] sendmail - smtp security/authentication & port 587 issues

2011-06-26 Thread Devin Reade
Max Pyziur  wrote:

> Are there any views in this CentOs user community on [using port 587]?

Yes.  Not only is enabling 'submission' a good idea, but you should also 
enable 'smtps' (which is different from smtp+tls):

DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl

> To authenticate, users would first have to POP their mail.
> 
> Is there a better way of doing this?

As others have said, yes.  Details:

Have the users do authentication over smtp+tls, submission, or smtps
(you should enable all three and let the users pick as the optimal
solution varies with email client).

To do this safely, you *must* ensure that you only permit someone
to authenticate if they're on an encrypted session.

define(`confAUTH_OPTIONS', `A,p,y')dnl
TRUST_AUTH_MECH(`EXTERNAL LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL LOGIN PLAIN')dnl
define(`confTLS_SRV_OPTIONS', `V')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl

You need to set up saslauthd to support it.  I use saslauthd to query ldap.
My systems also use cyrus imapd as the MDA, although you could use
other MDAs.

Remember to set up SSL (confCACERT_PATH, confCACERT, confSERVER_CERT,
confSERVER_KEY).

Devin

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


[CentOS] Still having umask problems

2011-06-26 Thread Todd Cary
I have the samba problems solved thanks to the help of folks on 
this forum, but I do not have the php umask problems solved.

The www directory is /var/www/html and the html directory is 
owned by apache and is in the apache groups with the following 
permissions:

drwxrwsr--

A sub-driectory, /var/www/html/viewpoints has the same attributes 
as the html directory, however when php creates a directory 
within /var/www/html/viewpoints, the permissions are

drwxr-sr-x

My goal is to have any created directories and files to have 774 
permissions.

What am I missing?

Todd

-- 
Ariste Software
Petaluma, CA 94952

http://www.aristesoftware.com

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


Re: [CentOS] how do determine last file system on disk?

2011-06-26 Thread John R Pierce
On 06/26/11 3:53 AM, Robert Heller wrote:
> It is also possible that the drives got 'wiped' somehow, eg they were
> on the bottom shelf when the cleaning crew came by with the floor waxing
> machine...

in that scenario, you would get nothing but servo errors from the drive, 
they wouldn't even finish spinning up


-- 
john r pierceN 37, W 122
santa cruz ca mid-left coast

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


Re: [CentOS] iptables port forwarding

2011-06-26 Thread muiz
Thanks  Marian,
The server only has one IP. I think I should add more iptables records, only 
one NAT record is not enough,isit correct?  If yes , then how?


 2011-06-26 23:38:58,"Marian Marinov"  wrote:

>On Sunday 26 June 2011 12:53:07 muiz wrote:
>> Dear all,
>>   I would like to forward a port to an internet server, but failed. can you
>> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
>> Remote server:   IP: a.b.c.d  Port: 8181
>> 
>> 
>> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward) ->
>> a.b.c.d  Port: 8181 -
>> In Fedora, I successfully to config the firewall using
>> system-config-firewall and iptables command: 1. Run system-config-firewall
>>  1.1 open local port 8080
>>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
>> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
>> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p
>> tcp --dport 8181 -j MASQUERADE That's all.
>> 
>> 
>> 
>> 
>> Thanks !
>You have to use Destination NAT for the job:
>
>iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to a.b.c.d:8181
>echo 1 > /proc/sys/net/ipv4/ip_foward
>
>If you have more then one IPs on the local machine its a good idea to specify 
>the destination -d 192.168.1.250 
>
>Marian

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


Re: [CentOS] iptables port forwarding

2011-06-26 Thread Marian Marinov
On Monday 27 June 2011 00:08:08 muiz wrote:
> Thanks  Marian,
> The server only has one IP. I think I should add more iptables records,
> only one NAT record is not enough,isit correct?  If yes , then how?

Huh, I'm sorry yes you need a second rule. So the rules are:
iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to a.b.c.d:8181
iptables -t nat -A POSTROUTING -j SNAT -s local_ip/local_net --to 
192.168.1.250
echo 1 > /proc/sys/net/ipv4/ip_foward

The Source NAT(SNAT) rule is needed, cause otherwise the packaets that reach 
a.b.c.d will be comming from the ip of the local client not 192.168.1.250 and 
so 192.168.1.250 will never receive the replies from a.b.c.d.
Since the packets reach the client directly from a.b.c.d, the client will 
simply disregard them and will wait for packets comming from .1.250.

So the SNAT rule changes the SOURCE IP of the packets to 1.250 so a.b.c.d will 
return the answares to the right source.

Marian

> 
> 
>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
> 
> >On Sunday 26 June 2011 12:53:07 muiz wrote:
> >> Dear all,
> >> 
> >>   I would like to forward a port to an internet server, but failed. can
> >>   you
> >> 
> >> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
> >> Remote server:   IP: a.b.c.d  Port: 8181
> >> 
> >> 
> >> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward) ->
> >> a.b.c.d  Port: 8181 -
> >> In Fedora, I successfully to config the firewall using
> >> system-config-firewall and iptables command: 1. Run
> >> system-config-firewall
> >> 
> >>  1.1 open local port 8080
> >>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
> >> 
> >> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
> >> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d
> >> -p tcp --dport 8181 -j MASQUERADE That's all.
> >> 
> >> 
> >> 
> >> 
> >> Thanks !
> >
> >You have to use Destination NAT for the job:
> >
> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
> >
> >If you have more then one IPs on the local machine its a good idea to
> >specify the destination -d 192.168.1.250
> >
> >Marian
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
Best regards,
Marian Marinov


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Does anyone using dm-cache?

2011-06-26 Thread Kai Schaetzl
Rudi Ahlers wrote on Fri, 24 Jun 2011 17:42:16 +0200:

> it's 2 different list, with different people
> and different input

Ask on one list first, wait, if you ask on another provide what you got so 
far from the other list. That is plain courtesy.

Kai


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


[CentOS] Latest kernel produces kernel error on Dell R200 on boot-up

2011-06-26 Thread Kai Schaetzl
I accidentally noticed this error written to the warn log on my Dell 
R200's when the machines booted up after latest kernel update. Google 
doesn't have this exact error, only a few with differently named devices, 
but all seem to have to do with USB. 
Could this be a bug?
Didn't see this error on other machines with more than one USB port, 
though.

Jun 26 22:59:07 c4 kernel: kobject_add failed for usbdev1.2_ep81 with -
EEXIST, don't try to register things with the same name in the same 
directory.
Jun 26 22:59:07 c4 kernel:
Jun 26 22:59:07 c4 kernel: Call Trace:
Jun 26 22:59:07 c4 kernel:  [] kobject_add+0x166/0x191
Jun 26 22:59:07 c4 kernel:  [] device_add+0x85/0x372
Jun 26 22:59:07 c4 kernel:  [] 
usb_create_ep_files+0x137/0x19a
Jun 26 22:59:07 c4 kernel:  [] klist_add_tail+0x35/0x42
Jun 26 22:59:07 c4 kernel:  [] 
usb_create_sysfs_intf_files+0x80/0x93
Jun 26 22:59:07 c4 kernel:  [] 
usb_set_configuration+0x3aa/0x3d9
Jun 26 22:59:07 c4 kernel:  [] 
usb_new_device+0x253/0x2c4
Jun 26 22:59:07 c4 kernel:  [] hub_thread+0x74e/0xb11
Jun 26 22:59:07 c4 kernel:  [] 
autoremove_wake_function+0x0/0x2e
Jun 26 22:59:07 c4 kernel:  [] hub_thread+0x0/0xb11
Jun 26 22:59:07 c4 kernel:  [] 
keventd_create_kthread+0x0/0xc4
Jun 26 22:59:07 c4 kernel:  [] kthread+0xfe/0x132
Jun 26 22:59:07 c4 kernel:  [] child_rip+0xa/0x12
Jun 26 22:59:07 c4 kernel:  [] 
keventd_create_kthread+0x0/0xc4
Jun 26 22:59:07 c4 kernel:  [] kthread+0x0/0x132
Jun 26 22:59:07 c4 kernel:  [] child_rip+0x0/0x12


Kai


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


[CentOS] Still having umask problems [resend]

2011-06-26 Thread Todd Cary
I have the samba problems solved thanks to the help of folks on 
this forum, but I do not have the php umask problems solved.

The www directory is /var/www/html and the html directory is 
owned by apache and is in the apache groups with the following 
permissions:

drwxrwsr--

A sub-driectory, /var/www/html/viewpoints has the same attributes 
as the html directory, however when php creates a directory 
within /var/www/html/viewpoints, the permissions are

drwxr-sr-x

My goal is to have any created directories and files to have 774 
permissions.

What am I missing?

Todd

-- 
Ariste Software
Petaluma, CA 94952

http://www.aristesoftware.com

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


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread Mark Bradbury
>
>
> yes cool isn't it, that webpage is updated! actually that's what makes
> it useful.
> besides, read the title text on that page again:
> "QA dates are tentative dates for internal planning only. These are not
> official release dates, but only a guide for the QA team. All target
> dates are subject to change."
>
>
Which makes it pretty useless.



-- 
No trees were killed to send this message,
but a large number of electrons were terribly inconvenienced.

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


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread robert mena
So,

to go back to the topic what is the current status for 6.0? Will it happen
in June or July?
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Still having umask problems [resend]

2011-06-26 Thread Drew
> My goal is to have any created directories and files to have 774
> permissions.

Hi Todd,

Am I correct in assuming the php script that creates the directory
uses the mkdir() function? If so something along the lines of:
mkdir('mydir', 0774); should suffice. The 0 can be changed to 2, 4 or
6 depending on what combination of SGID & SUID sticky bits you want on
the directory.

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


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread Christopher Chan
On Monday, June 27, 2011 10:46 AM, robert mena wrote:
> So,
>
> to go back to the topic what is the current status for 6.0? Will it
> happen in June or July?
>

I vote "who cares?"
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread John R. Dennison
On Mon, Jun 27, 2011 at 11:25:21AM +0800, Christopher Chan wrote:
> 
> I vote "who cares?"

I vote "http://qaweb.dev.centos.org";.




John

-- 
I begin by taking.  I shall find scholars later to demonstrate my perfect right.

-- Euripides (c 480 BC - 406 BC), Greek playwright, Suppliants


pgpBsgJZs8ywH.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] iptables port forwarding

2011-06-26 Thread muiz
Dear Marian and all,
  It seems don't works:
/sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to 
a.b.c.d:8181
/sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0 --to 
a.b.c.d
echo 1 > /proc/sys/net/ipv4/ip_foward


I check the Fedora iptables setting:  /etc/sysconfig/iptables files:
...
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -i eth+ -p tcp --dport 8080 -j DNAT --to-destination a.b.c.d:8080

:OUTPUT ACCEPT [0:0]
-A FORWARD -i eth+ -m state --state NEW -m tcp -p tcp -d a.b.c.d --dport 8080 
-j ACCEPT


And more rules I add is :
/sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp --dport 8080 -j 
MASQUERADE


Then it works!  But if I don't use system-config-firewall GUI tools, then how?




Thanks very much !



At 2011-06-27,"Marian Marinov"  wrote:

>On Monday 27 June 2011 00:08:08 muiz wrote:
>> Thanks  Marian,
>> The server only has one IP. I think I should add more iptables records,
>> only one NAT record is not enough,isit correct?  If yes , then how?
>
>Huh, I'm sorry yes you need a second rule. So the rules are:
>iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to a.b.c.d:8181
>iptables -t nat -A POSTROUTING -j SNAT -s local_ip/local_net --to 
>192.168.1.250
>echo 1 > /proc/sys/net/ipv4/ip_foward
>
>The Source NAT(SNAT) rule is needed, cause otherwise the packaets that reach 
>a.b.c.d will be comming from the ip of the local client not 192.168.1.250 and 
>so 192.168.1.250 will never receive the replies from a.b.c.d.
>Since the packets reach the client directly from a.b.c.d, the client will 
>simply disregard them and will wait for packets comming from .1.250.
>
>So the SNAT rule changes the SOURCE IP of the packets to 1.250 so a.b.c.d will 
>return the answares to the right source.
>
>Marian
>
>> 
>> 
>>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
>> 
>> >On Sunday 26 June 2011 12:53:07 muiz wrote:
>> >> Dear all,
>> >> 
>> >>   I would like to forward a port to an internet server, but failed. can
>> >>   you
>> >> 
>> >> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
>> >> Remote server:   IP: a.b.c.d  Port: 8181
>> >> 
>> >> 
>> >> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward) ->
>> >> a.b.c.d  Port: 8181 -
>> >> In Fedora, I successfully to config the firewall using
>> >> system-config-firewall and iptables command: 1. Run
>> >> system-config-firewall
>> >> 
>> >>  1.1 open local port 8080
>> >>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
>> >> 
>> >> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
>> >> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d
>> >> -p tcp --dport 8181 -j MASQUERADE That's all.
>> >> 
>> >> 
>> >> 
>> >> 
>> >> Thanks !
>> >
>> >You have to use Destination NAT for the job:
>> >
>> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
>> >a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
>> >
>> >If you have more then one IPs on the local machine its a good idea to
>> >specify the destination -d 192.168.1.250
>> >
>> >Marian
>> 
>> ___
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>
>-- 
>Best regards,
>Marian Marinov
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] iptables port forwarding

2011-06-26 Thread Marian Marinov
On Monday 27 June 2011 06:50:27 muiz wrote:
> Dear Marian and all,
>   It seems don't works:
> /sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
> 192.168.0.0/255.255.255.0 --to a.b.c.d echo 1 >
> /proc/sys/net/ipv4/ip_foward

Yup, its normal not to work... You got the SNAT rule wrong :)

It should be to the IP of the server that is DOING the forwarding...

so 

/sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0 --to 
192.168.1.250

Marian

> 
> 
> I check the Fedora iptables setting:  /etc/sysconfig/iptables files:
> ...
> 
> :POSTROUTING ACCEPT [0:0]
> 
> -A PREROUTING -i eth+ -p tcp --dport 8080 -j DNAT --to-destination
> a.b.c.d:8080 
> 
> :OUTPUT ACCEPT [0:0]
> 
> -A FORWARD -i eth+ -m state --state NEW -m tcp -p tcp -d a.b.c.d --dport
> 8080 -j ACCEPT
> 
> 
> And more rules I add is :
> /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp --dport 8080 -j
> MASQUERADE
> 
> 
> Then it works!  But if I don't use system-config-firewall GUI tools, then
> how?
> 
> 
> 
> 
> Thanks very much !
> 
> At 2011-06-27,"Marian Marinov"  wrote:
> >On Monday 27 June 2011 00:08:08 muiz wrote:
> >> Thanks  Marian,
> >> The server only has one IP. I think I should add more iptables records,
> >> only one NAT record is not enough,isit correct?  If yes , then how?
> >
> >Huh, I'm sorry yes you need a second rule. So the rules are:
> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >a.b.c.d:8181 iptables -t nat -A POSTROUTING -j SNAT -s local_ip/local_net
> >--to 192.168.1.250
> >echo 1 > /proc/sys/net/ipv4/ip_foward
> >
> >The Source NAT(SNAT) rule is needed, cause otherwise the packaets that
> >reach a.b.c.d will be comming from the ip of the local client not
> >192.168.1.250 and so 192.168.1.250 will never receive the replies from
> >a.b.c.d.
> >Since the packets reach the client directly from a.b.c.d, the client will
> >simply disregard them and will wait for packets comming from .1.250.
> >
> >So the SNAT rule changes the SOURCE IP of the packets to 1.250 so a.b.c.d
> >will return the answares to the right source.
> >
> >Marian
> >
> >>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
> >>  
> >> >On Sunday 26 June 2011 12:53:07 muiz wrote:
> >> >> Dear all,
> >> >> 
> >> >>   I would like to forward a port to an internet server, but failed.
> >> >>   can you
> >> >> 
> >> >> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
> >> >> Remote server:   IP: a.b.c.d  Port: 8181
> >> >> 
> >> >> 
> >> >> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward)
> >> >> -> a.b.c.d  Port: 8181 - In
> >> >> Fedora, I successfully to config the firewall using
> >> >> system-config-firewall and iptables command: 1. Run
> >> >> system-config-firewall
> >> >> 
> >> >>  1.1 open local port 8080
> >> >>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
> >> >> 
> >> >> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
> >> >> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d 
> >> >> a.b.c.d -p tcp --dport 8181 -j MASQUERADE That's all.
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> Thanks !
> >> >
> >> >You have to use Destination NAT for the job:
> >> >
> >> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >> >a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
> >> >
> >> >If you have more then one IPs on the local machine its a good idea to
> >> >specify the destination -d 192.168.1.250
> >> >
> >> >Marian
> >> 
> >> ___
> >> CentOS mailing list
> >> CentOS@centos.org
> >> http://lists.centos.org/mailman/listinfo/centos

-- 
Best regards,
Marian Marinov


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread Christopher Chan
On Monday, June 27, 2011 11:48 AM, John R. Dennison wrote:
> On Mon, Jun 27, 2011 at 11:25:21AM +0800, Christopher Chan wrote:
>>
>> I vote "who cares?"
>
> I vote "http://qaweb.dev.centos.org";.
>

Too bad that does not seem to be good enough for some.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] iptables port forwarding

2011-06-26 Thread muiz
Marian,  I'm very happy you're online :)I think I have try the record you 
mention just now. And I would like to clear what I have done (the scripts I 
test):/sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to 
a.b.c.d:8181 
/sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0 --to 
192.168.1.250
echo 1 > /proc/sys/net/ipv4/ip_fowardThen it's not to work!




At 2011-06-27,"Marian Marinov"  wrote:

>On Monday 27 June 2011 06:50:27 muiz wrote:
>> Dear Marian and all,
>>   It seems don't works:
>> /sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
>> a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
>> 192.168.0.0/255.255.255.0 --to a.b.c.d echo 1 >
>> /proc/sys/net/ipv4/ip_foward
>
>Yup, its normal not to work... You got the SNAT rule wrong :)
>
>It should be to the IP of the server that is DOING the forwarding...
>
>so 
>
>/sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0 --to 
>192.168.1.250
>
>Marian
>
>> 
>> 
>> I check the Fedora iptables setting:  /etc/sysconfig/iptables files:
>> ...
>> 
>> :POSTROUTING ACCEPT [0:0]
>> 
>> -A PREROUTING -i eth+ -p tcp --dport 8080 -j DNAT --to-destination
>> a.b.c.d:8080 
>> 
>> :OUTPUT ACCEPT [0:0]
>> 
>> -A FORWARD -i eth+ -m state --state NEW -m tcp -p tcp -d a.b.c.d --dport
>> 8080 -j ACCEPT
>> 
>> 
>> And more rules I add is :
>> /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp --dport 8080 -j
>> MASQUERADE
>> 
>> 
>> Then it works!  But if I don't use system-config-firewall GUI tools, then
>> how?
>> 
>> 
>> 
>> 
>> Thanks very much !
>> 
>> At 2011-06-27,"Marian Marinov"  wrote:
>> >On Monday 27 June 2011 00:08:08 muiz wrote:
>> >> Thanks  Marian,
>> >> The server only has one IP. I think I should add more iptables records,
>> >> only one NAT record is not enough,isit correct?  If yes , then how?
>> >
>> >Huh, I'm sorry yes you need a second rule. So the rules are:
>> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
>> >a.b.c.d:8181 iptables -t nat -A POSTROUTING -j SNAT -s local_ip/local_net
>> >--to 192.168.1.250
>> >echo 1 > /proc/sys/net/ipv4/ip_foward
>> >
>> >The Source NAT(SNAT) rule is needed, cause otherwise the packaets that
>> >reach a.b.c.d will be comming from the ip of the local client not
>> >192.168.1.250 and so 192.168.1.250 will never receive the replies from
>> >a.b.c.d.
>> >Since the packets reach the client directly from a.b.c.d, the client will
>> >simply disregard them and will wait for packets comming from .1.250.
>> >
>> >So the SNAT rule changes the SOURCE IP of the packets to 1.250 so a.b.c.d
>> >will return the answares to the right source.
>> >
>> >Marian
>> >
>> >>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
>> >>  
>> >> >On Sunday 26 June 2011 12:53:07 muiz wrote:
>> >> >> Dear all,
>> >> >> 
>> >> >>   I would like to forward a port to an internet server, but failed.
>> >> >>   can you
>> >> >> 
>> >> >> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
>> >> >> Remote server:   IP: a.b.c.d  Port: 8181
>> >> >> 
>> >> >> 
>> >> >> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080 (forward)
>> >> >> -> a.b.c.d  Port: 8181 - In
>> >> >> Fedora, I successfully to config the firewall using
>> >> >> system-config-firewall and iptables command: 1. Run
>> >> >> system-config-firewall
>> >> >> 
>> >> >>  1.1 open local port 8080
>> >> >>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
>> >> >> 
>> >> >> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
>> >> >> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d 
>> >> >> a.b.c.d -p tcp --dport 8181 -j MASQUERADE That's all.
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >> Thanks !
>> >> >
>> >> >You have to use Destination NAT for the job:
>> >> >
>> >> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
>> >> >a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
>> >> >
>> >> >If you have more then one IPs on the local machine its a good idea to
>> >> >specify the destination -d 192.168.1.250
>> >> >
>> >> >Marian
>> >> 
>> >> ___
>> >> CentOS mailing list
>> >> CentOS@centos.org
>> >> http://lists.centos.org/mailman/listinfo/centos
>
>-- 
>Best regards,
>Marian Marinov
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] iptables port forwarding

2011-06-26 Thread Marian Marinov
On Monday 27 June 2011 07:15:33 muiz wrote:
> Marian,  I'm very happy you're online :)I think I have try the record you
> mention just now. And I would like to clear what I have done (the scripts
> I test):/sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080
> --to a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
> 192.168.0.0/255.255.255.0 --to 192.168.1.250 echo 1 >
> /proc/sys/net/ipv4/ip_fowardThen it's not to work!

You have to have some other iptables rules that block the traffic since this 
has 
to work.

Marian

> At 2011-06-27,"Marian Marinov"  wrote:
> >On Monday 27 June 2011 06:50:27 muiz wrote:
> >> Dear Marian and all,
> >> 
> >>   It seems don't works:
> >> /sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >> a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
> >> 192.168.0.0/255.255.255.0 --to a.b.c.d echo 1 >
> >> /proc/sys/net/ipv4/ip_foward
> >
> >Yup, its normal not to work... You got the SNAT rule wrong :)
> >
> >It should be to the IP of the server that is DOING the forwarding...
> >
> >so
> >
> >/sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0
> >--to 192.168.1.250
> >
> >Marian
> >
> >> I check the Fedora iptables setting:  /etc/sysconfig/iptables files:
> >> ...
> >> 
> >> :POSTROUTING ACCEPT [0:0]
> >> 
> >> -A PREROUTING -i eth+ -p tcp --dport 8080 -j DNAT --to-destination
> >> a.b.c.d:8080 
> >> 
> >> :OUTPUT ACCEPT [0:0]
> >> 
> >> -A FORWARD -i eth+ -m state --state NEW -m tcp -p tcp -d a.b.c.d --dport
> >> 8080 -j ACCEPT
> >> 
> >> 
> >> And more rules I add is :
> >> /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp --dport 8080 -j
> >> MASQUERADE
> >> 
> >> 
> >> Then it works!  But if I don't use system-config-firewall GUI tools,
> >> then how?
> >> 
> >> 
> >> 
> >> 
> >> Thanks very much !
> >> 
> >> At 2011-06-27,"Marian Marinov"  wrote:
> >> >On Monday 27 June 2011 00:08:08 muiz wrote:
> >> >> Thanks  Marian,
> >> >> The server only has one IP. I think I should add more iptables
> >> >> records, only one NAT record is not enough,isit correct?  If yes ,
> >> >> then how?
> >> >
> >> >Huh, I'm sorry yes you need a second rule. So the rules are:
> >> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >> >a.b.c.d:8181 iptables -t nat -A POSTROUTING -j SNAT -s
> >> >local_ip/local_net --to 192.168.1.250
> >> >echo 1 > /proc/sys/net/ipv4/ip_foward
> >> >
> >> >The Source NAT(SNAT) rule is needed, cause otherwise the packaets that
> >> >reach a.b.c.d will be comming from the ip of the local client not
> >> >192.168.1.250 and so 192.168.1.250 will never receive the replies from
> >> >a.b.c.d.
> >> >Since the packets reach the client directly from a.b.c.d, the client
> >> >will simply disregard them and will wait for packets comming from
> >> >.1.250.
> >> >
> >> >So the SNAT rule changes the SOURCE IP of the packets to 1.250 so
> >> >a.b.c.d will return the answares to the right source.
> >> >
> >> >Marian
> >> >
> >> >>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
> >> >>  
> >> >> >On Sunday 26 June 2011 12:53:07 muiz wrote:
> >> >> >> Dear all,
> >> >> >> 
> >> >> >>   I would like to forward a port to an internet server, but
> >> >> >>   failed. can you
> >> >> >> 
> >> >> >> help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
> >> >> >> Remote server:   IP: a.b.c.d  Port: 8181
> >> >> >> 
> >> >> >> 
> >> >> >> Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080
> >> >> >> (forward) -> a.b.c.d  Port: 8181
> >> >> >> - In Fedora, I
> >> >> >> successfully to config the firewall using
> >> >> >> system-config-firewall and iptables command: 1. Run
> >> >> >> system-config-firewall
> >> >> >> 
> >> >> >>  1.1 open local port 8080
> >> >> >>  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp
> >> >> >> 
> >> >> >> 2. echo 1 > /proc/sys/net/ipv4/ip_foward
> >> >> >> 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d
> >> >> >> a.b.c.d -p tcp --dport 8181 -j MASQUERADE That's all.
> >> >> >> 
> >> >> >> 
> >> >> >> 
> >> >> >> 
> >> >> >> Thanks !
> >> >> >
> >> >> >You have to use Destination NAT for the job:
> >> >> >
> >> >> >iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> >> >> >a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
> >> >> >
> >> >> >If you have more then one IPs on the local machine its a good idea
> >> >> >to specify the destination -d 192.168.1.250
> >> >> >
> >> >> >Marian
> >> >> 
> >> >> ___
> >> >> CentOS mailing list
> >> >> CentOS@centos.org
> >> >> http://lists.centos.org/mailman/listinfo/centos

-- 
Best regards,
Marian Marinov


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS-6 Status updates

2011-06-26 Thread Ljubomir Ljubojevic
Mark Bradbury wrote:
> 
> yes cool isn't it, that webpage is updated! actually that's what makes
> it useful.
> besides, read the title text on that page again:
> "QA dates are tentative dates for internal planning only. These are not
> official release dates, but only a guide for the QA team. All target
> dates are subject to change."
> 
> 
> Which makes it pretty useless. 
> 

Not quite. Those are at least "not before this date". And those are 
goals set for upcoming period. If issues are found between now and then, 
then schedule has to be moved. They are not Microsoft to release 
unfinished product.

But I do think that some kind of announcement that target date 
might/will not be met should be posted 1-2 days prior to that date. That 
would make speculations at lowest minimum possible.

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


Re: [CentOS] Latest kernel produces kernel error on Dell R200 on boot-up

2011-06-26 Thread Ljubomir Ljubojevic
Kai Schaetzl wrote:
> I accidentally noticed this error written to the warn log on my Dell 
> R200's when the machines booted up after latest kernel update. Google 
> doesn't have this exact error, only a few with differently named devices, 
> but all seem to have to do with USB. 
> Could this be a bug?
> Didn't see this error on other machines with more than one USB port, 
> though.
> 
> Jun 26 22:59:07 c4 kernel: kobject_add failed for usbdev1.2_ep81 with -
> EEXIST, don't try to register things with the same name in the same 
> directory.
> Jun 26 22:59:07 c4 kernel:
> Jun 26 22:59:07 c4 kernel: Call Trace:
> Jun 26 22:59:07 c4 kernel:  [] kobject_add+0x166/0x191
> Jun 26 22:59:07 c4 kernel:  [] device_add+0x85/0x372
> Jun 26 22:59:07 c4 kernel:  [] 
> usb_create_ep_files+0x137/0x19a
> Jun 26 22:59:07 c4 kernel:  [] klist_add_tail+0x35/0x42
> Jun 26 22:59:07 c4 kernel:  [] 
> usb_create_sysfs_intf_files+0x80/0x93
> Jun 26 22:59:07 c4 kernel:  [] 
> usb_set_configuration+0x3aa/0x3d9
> Jun 26 22:59:07 c4 kernel:  [] 
> usb_new_device+0x253/0x2c4
> Jun 26 22:59:07 c4 kernel:  [] hub_thread+0x74e/0xb11
> Jun 26 22:59:07 c4 kernel:  [] 
> autoremove_wake_function+0x0/0x2e
> Jun 26 22:59:07 c4 kernel:  [] hub_thread+0x0/0xb11
> Jun 26 22:59:07 c4 kernel:  [] 
> keventd_create_kthread+0x0/0xc4
> Jun 26 22:59:07 c4 kernel:  [] kthread+0xfe/0x132
> Jun 26 22:59:07 c4 kernel:  [] child_rip+0xa/0x12
> Jun 26 22:59:07 c4 kernel:  [] 
> keventd_create_kthread+0x0/0xc4
> Jun 26 22:59:07 c4 kernel:  [] kthread+0x0/0x132
> Jun 26 22:59:07 c4 kernel:  [] child_rip+0x0/0x12
> 
> 
> Kai
> 
You failed to mention that this is CentOS 4 kernel, am I correct it is 
C4? Adding as much info as possible is always advised.

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


Re: [CentOS] iptables port forwarding

2011-06-26 Thread Ljubomir Ljubojevic
Marian Marinov wrote:
> On Monday 27 June 2011 07:15:33 muiz wrote:
>> Marian,  I'm very happy you're online :)I think I have try the record you
>> mention just now. And I would like to clear what I have done (the scripts
>> I test):/sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080
>> --to a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
>> 192.168.0.0/255.255.255.0 --to 192.168.1.250 echo 1 >
>> /proc/sys/net/ipv4/ip_fowardThen it's not to work!
> 
> You have to have some other iptables rules that block the traffic since this 
> has 
> to work.
> 
> Marian
> 
>> At 2011-06-27,"Marian Marinov"  wrote:
>>> On Monday 27 June 2011 06:50:27 muiz wrote:
 Dear Marian and all,

   It seems don't works:
 /sbin/iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
 a.b.c.d:8181 /sbin/iptables -t nat -A POSTROUTING -j SNAT -s
 192.168.0.0/255.255.255.0 --to a.b.c.d echo 1 >
 /proc/sys/net/ipv4/ip_foward
>>> Yup, its normal not to work... You got the SNAT rule wrong :)
>>>
>>> It should be to the IP of the server that is DOING the forwarding...
>>>
>>> so
>>>
>>> /sbin/iptables -t nat -A POSTROUTING -j SNAT -s 192.168.0.0/255.255.255.0
>>> --to 192.168.1.250
>>>
>>> Marian
>>>
 I check the Fedora iptables setting:  /etc/sysconfig/iptables files:
 ...

 :POSTROUTING ACCEPT [0:0]

 -A PREROUTING -i eth+ -p tcp --dport 8080 -j DNAT --to-destination
 a.b.c.d:8080 

 :OUTPUT ACCEPT [0:0]

 -A FORWARD -i eth+ -m state --state NEW -m tcp -p tcp -d a.b.c.d --dport
 8080 -j ACCEPT


 And more rules I add is :
 /sbin/iptables -t nat -A POSTROUTING -d  a.b.c.d -p tcp --dport 8080 -j
 MASQUERADE


 Then it works!  But if I don't use system-config-firewall GUI tools,
 then how?




 Thanks very much !

 At 2011-06-27,"Marian Marinov"  wrote:
> On Monday 27 June 2011 00:08:08 muiz wrote:
>> Thanks  Marian,
>> The server only has one IP. I think I should add more iptables
>> records, only one NAT record is not enough,isit correct?  If yes ,
>> then how?
> Huh, I'm sorry yes you need a second rule. So the rules are:
> iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
> a.b.c.d:8181 iptables -t nat -A POSTROUTING -j SNAT -s
> local_ip/local_net --to 192.168.1.250
> echo 1 > /proc/sys/net/ipv4/ip_foward
>
> The Source NAT(SNAT) rule is needed, cause otherwise the packaets that
> reach a.b.c.d will be comming from the ip of the local client not
> 192.168.1.250 and so 192.168.1.250 will never receive the replies from
> a.b.c.d.
> Since the packets reach the client directly from a.b.c.d, the client
> will simply disregard them and will wait for packets comming from
> .1.250.
>
> So the SNAT rule changes the SOURCE IP of the packets to 1.250 so
> a.b.c.d will return the answares to the right source.
>
> Marian
>
>>  2011-06-26 23:38:58,"Marian Marinov"  wrote:
>>  
>>> On Sunday 26 June 2011 12:53:07 muiz wrote:
 Dear all,

   I would like to forward a port to an internet server, but
   failed. can you

 help me? Server:  eth0: 192.168.1.250, Port: 8080 TCP, CentOS 5.6
 Remote server:   IP: a.b.c.d  Port: 8181


 Forward path:  client1(192.168.1.10) -> 192.168.1.250:8080
 (forward) -> a.b.c.d  Port: 8181
 - In Fedora, I
 successfully to config the firewall using
 system-config-firewall and iptables command: 1. Run
 system-config-firewall

  1.1 open local port 8080
  1.2 add a forward rule: local 8080 to remote a.b.c.d:8181, tcp

 2. echo 1 > /proc/sys/net/ipv4/ip_foward
 3. add a iptables rule: /sbin/iptables -t nat -A POSTROUTING -d
 a.b.c.d -p tcp --dport 8181 -j MASQUERADE That's all.




 Thanks !
>>> You have to use Destination NAT for the job:
>>>
>>> iptables -t nat -A PREROUTING -j DNAT -p tcp --dport 8080 --to
>>> a.b.c.d:8181 echo 1 > /proc/sys/net/ipv4/ip_foward
>>>
>>> If you have more then one IPs on the local machine its a good idea
>>> to specify the destination -d 192.168.1.250
>>>
>>> Marian
>> ___
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
> 

Actually, very BIG difference in two scripts is that on Fedora he 
redirects port 8080 to a.b.c.d 8080, but in OP he said a.b.c.d uses port 
8181!!!

And if correction of the port does not help, then he can try with 
additional rule:

-A FORWARD -i eth+ -p tcp -d a.b.c.d --dport 8080 -j ACCEPT


Ljubomir
___
CentOS mailing list
CentOS@centos.org
h