Re: Bind service to a particular ethernet device

From: Chris Lowth (my.address.is_at_chris.at.lowth.dot.com)
Date: 09/06/05


Date: Tue, 06 Sep 2005 07:20:33 GMT

Ignacio Garcia wrote:
> Hi there!
>
> I would like to run two instances (with different configurations) of a
> service that runs on a specific port (and I must use that specific port
> only). Is it possible to bind each instance of the program to two
> different ethernet cards so I can access each service on different IPs?
>
> TIA,
>
> Ignacio

It depends on the program itself.

If it's a service that is started by xinetd (like a pop3 server, for
example) then add a "bind" option to the /etc/xinetd.conf or better the
relevant file in /etc/xinetd.d (this is the location on redhat/fedora
distribs)

The bind option takes the IP address of the interface, as in..

service pop3s
{
         disable = yes
         socket_type = stream
         wait = no
         user = root
         server = /usr/sbin/ipop3d
         log_on_success += HOST DURATION
         log_on_failure += HOST
         bind = 192.168.0.123
}

Chris

--
Rope: The scripting language that runs INSIDE the linux kernel for 
writing iptables packet-matching modules.
      http://www.lowth.com/rope


Relevant Pages

  • Re: Bind service to a particular ethernet device
    ... On Mon, 05 Sep 2005, Ignacio Garcia wrote: ... > I would like to run two instances (with different configurations) of a ... > service that runs on a specific port (and I must use that specific port ... Is it possible to bind each instance of the program to two ...
    (comp.os.linux.networking)
  • Re: How to listen to more a specific IP and specific ports
    ... bind my socket to specific unlimited and selective IP addresses. ... Moreover, in Unix/Linux Berekly network programming, you can determin the ... port numbers. ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to listen to more a specific IP and specific ports
    ... I have read this long time ago in the textbook Unix Network Programming ... service and connect our socket to INADDR_ANY and then listen for incoming ... Its clear to me on how to bind with ... port numbers. ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to listen to more a specific IP and specific ports
    ... bind my socket to specific unlimited and selective IP addresses. ... Moreover, in Unix/Linux Berekly network programming, you can determin the IP ... port numbers. ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to listen to more a specific IP and specific ports
    ... bind my socket to specific unlimited and selective IP addresses. ... port numbers. ... is not feasible because the particular IPs are not fixed. ...
    (microsoft.public.win32.programmer.networks)