Re: [gentoo-user] redirect connections to localhost
On Friday 01 January 2010, Alexander wrote: On Friday 01 January 2010 03:07:42 Etaoin Shrdlu wrote: On Thursday 31 December 2009, Alexander wrote: Is there a way to redirect TCP connections from external network interfaces to the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target in iptables. Uh...why don't you use DNAT then? This doesn't work, because kernel drops any packets that come from external network to 127.0.0.0/8. Of course it does. But in these cases, the workaround is assigning a non-127 address to the lo interface, like 192.168.0.1/32 for example, and DNAT to that address (and have whatever program should receive the data listen on 192.168.0.1, of course).
Re: [gentoo-user] redirect connections to localhost
On Friday 01 January 2010 14:38:36 Etaoin Shrdlu wrote: On Friday 01 January 2010, Alexander wrote: On Friday 01 January 2010 03:07:42 Etaoin Shrdlu wrote: On Thursday 31 December 2009, Alexander wrote: Is there a way to redirect TCP connections from external network interfaces to the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target in iptables. Uh...why don't you use DNAT then? This doesn't work, because kernel drops any packets that come from external network to 127.0.0.0/8. Of course it does. But in these cases, the workaround is assigning a non-127 address to the lo interface, like 192.168.0.1/32 for example, and DNAT to that address (and have whatever program should receive the data listen on 192.168.0.1, of course). This way eats some private network address range and this could be cause of a collisions with an external private networks. Reconfiguring services for a new ip ranges isn't so easy procedure in general (let's consider device that should work just out of the box with a trivial configutation efforts). Thus it's important use some subsets of 127.0.0.0/8 network for that. I have just been advised to look at net-misc/stone or net-proxy/haproxy (thanks to has been adviced), but I'm not sure that this will work like DNAT.
Re: [gentoo-user] redirect connections to localhost
On Thursday 31 December 2009, Alexander wrote: Is there a way to redirect TCP connections from external network interfaces to the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target in iptables. Uh...why don't you use DNAT then?
Re: [gentoo-user] redirect connections to localhost
On Friday 01 January 2010 03:07:42 Etaoin Shrdlu wrote: On Thursday 31 December 2009, Alexander wrote: Is there a way to redirect TCP connections from external network interfaces to the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target in iptables. Uh...why don't you use DNAT then? This doesn't work, because kernel drops any packets that come from external network to 127.0.0.0/8.
Re: [gentoo-user] redirect
On Fri, 21 Jul 2006 15:43:30 -0700, Richard Fish wrote: The correct syntax is foo 21, There's also the shortcut of foo if you want to redirect stdout and stderr to the same place. -- Neil Bothwick Nothing is foolproof to a sufficiently talented fool. signature.asc Description: PGP signature
Re: [gentoo-user] redirect
On Fri, 21 Jul 2006 17:11:48 -0400, James Lockie wrote: How do I redirect the error from an emerge? Set PORT_LOGDIR in /etc/make.conf. The directory you set it to must exist and be writable by portage. -- Neil Bothwick WinErr 01F: Reserved for future mistakes of our developers. signature.asc Description: PGP signature
Re: [gentoo-user] redirect
On 7/21/06, James Lockie [EMAIL PROTECTED] wrote: How do I redirect the error from an emerge? I did 'emerge system 21 t' and that does most of it but it misses the actual error message. 21 foo is the wrong syntax for what you want. This first copies stderr to stdout, and the second part redirects stdout to a file, but stderr is still going to the file descriptor that stdout originally refered to. It is logically the equivalent of: stdout=1 stderr=2 stderr=$stdout stdout=foo echo $stderr The correct syntax is foo 21, which does the logical equivalent of: stdout=1 stderr=2 stdout=foo stderr=$stdout HTH, -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
Delca wrote on 05/02/06 17:52: The problem is that i don't know how to send all mails that arrived to /var/spool/mail/username to other mail.. i.e.: i want to send all mails at /var/spool/mail/john to [EMAIL PROTECTED] The alias only sends the new incoming mails. Not the ones already on the file. Someone knows how to solve this? cd /var/spool/mail mv oldname newname chown newname newname Cheers, Dave -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
On Tuesday 02 May 2006 18:16, Dave Jones wrote: Someone knows how to solve this? cd /var/spool/mail mv oldname newname chown newname newname What if the second account is not local? -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
Etaoin Shrdlu wrote on 05/02/06 19:27: On Tuesday 02 May 2006 18:16, Dave Jones wrote: Someone knows how to solve this? cd /var/spool/mail mv oldname newname chown newname newname What if the second account is not local? Copying the mail spool file into /var/spool/mail to the machine you want to receive the mail on and then issuing the commands above should work. OK, this is a very 'quick and dirty' fix, but offhand I don't know of any other way to do it. Sorry, but I don't know how to persuade Sendmail to handle mail packages it's already processed and delivered to /var/spool/mail. HTH. Cheers, Dave -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
Delca wrote: The problem is that i don't know how to send all mails that arrived to /var/spool/mail/username to other mail.. i.e.: i want to send all mails at /var/spool/mail/john to [EMAIL PROTECTED] cat /var/spool/mail/${USER} | formail +1 -ds sendmail -oem ${USER} I don't know if it is working, it is not my idea. But you must have alias defined before, otherwise it would be delivered probably to the same mailbox (maybe infinite loop?)... Jarry -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
i mispelled my problem, sorry :P i want to send all arrived mails at /var/spool/mail/john to for example [EMAIL PROTECTED] or [EMAIL PROTECTED] i think the formail is a good option, but i don't know how to tell sendmail to send the mails! :( I tryed running your command and there was a little problem, some mails were sent again to all users (i've set up a 'to all' account i mean.. one mail that sends to every user an email) and i just want to be redirected to one mail account in particular. sorry again! Santiago On 5/2/06, Jarry [EMAIL PROTECTED] wrote: Delca wrote: The problem is that i don't know how to send all mails that arrived to /var/spool/mail/username to other mail.. i.e.: i want to send all mails at /var/spool/mail/john to [EMAIL PROTECTED] cat /var/spool/mail/${USER} | formail +1 -ds sendmail -oem ${USER} I don't know if it is working, it is not my idea. But you must have alias defined before, otherwise it would be delivered probably to the same mailbox (maybe infinite loop?)... Jarry -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
On Tuesday 02 May 2006 15:58, Delca wrote: i mispelled my problem, sorry :P i want to send all arrived mails at /var/spool/mail/john to for example [EMAIL PROTECTED] or [EMAIL PROTECTED] i think the formail is a good option, but i don't know how to tell sendmail to send the mails! :( I tryed running your command and there was a little problem, some mails were sent again to all users (i've set up a 'to all' account i mean.. one mail that sends to every user an email) and i just want to be redirected to one mail account in particular. sorry again! Santiago um, that's just an alias in /etc/mail/aliases, put john: [EMAIL PROTECTED], [EMAIL PROTECTED] save the file and run newaliases On 5/2/06, Jarry [EMAIL PROTECTED] wrote: Delca wrote: The problem is that i don't know how to send all mails that arrived to /var/spool/mail/username to other mail.. i.e.: i want to send all mails at /var/spool/mail/john to [EMAIL PROTECTED] cat /var/spool/mail/${USER} | formail +1 -ds sendmail -oem ${USER} I don't know if it is working, it is not my idea. But you must have alias defined before, otherwise it would be delivered probably to the same mailbox (maybe infinite loop?)... Jarry -- gentoo-user@gentoo.org mailing list -- John Jolet Your On-Demand IT Department 512-762-0729 www.jolet.net [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Redirect inbox to other mail (Sendmail)
But if i just do that, only the new mails are going to be redirected, not the ones that already arrived :( Santiago John Jolet wrote: On Tuesday 02 May 2006 15:58, Delca wrote: i mispelled my problem, sorry :P i want to send all arrived mails at /var/spool/mail/john to for example [EMAIL PROTECTED] or [EMAIL PROTECTED] i think the formail is a good option, but i don't know how to tell sendmail to send the mails! :( I tryed running your command and there was a little problem, some mails were sent again to all users (i've set up a 'to all' account i mean.. one mail that sends to every user an email) and i just want to be redirected to one mail account in particular. sorry again! Santiago um, that's just an alias in /etc/mail/aliases, put john: [EMAIL PROTECTED], [EMAIL PROTECTED] save the file and run newaliases On 5/2/06, Jarry [EMAIL PROTECTED] wrote: Delca wrote: The problem is that i don't know how to send all mails that arrived to /var/spool/mail/username to other mail.. i.e.: i want to send all mails at /var/spool/mail/john to [EMAIL PROTECTED] cat /var/spool/mail/${USER} | formail +1 -ds sendmail -oem ${USER} I don't know if it is working, it is not my idea. But you must have alias defined before, otherwise it would be delivered probably to the same mailbox (maybe infinite loop?)... Jarry -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list