Networking Forums

Networking Forums > Computer Networking > Linux Networking > Internet Alias/Virtual interface

Reply
Thread Tools Display Modes

Internet Alias/Virtual interface

 
 
AcCeSsDeNiEd
Guest
Posts: n/a

 
      01-25-2005, 08:04 AM
Hi Folks,

I have a an interface eth2 which has been assigned a public IP (e.g): 165.9.185.3.

I created a alias on it: eth2:0 with an IP of 165.9.185.4

From outside, I can ping this new alias IP but I cannot access any services via this alias (e.g,
telnet, pop, smtp..). my real .185.3 ip works.

The alias IP of .185.4 is within my given block of IP addresses by my ISP.

I tried shutting down my iptables and flushing everything but I still get the same results.

I wish to mention that I have 2 internet ifaces. On is on ADSL (ppp0) and the other on lease (eth2)
I have configured them accordingly to route packets to the correct gateway.
That means I can telnet/ftp to both the IPs of ppp0 and eth2.

Am I also suppose to add a route or something for the alias too? I can't remember how I did it for
ppp0/eth2 (was sometime back). Or is this alias thing an entirely new problem?


Thanks


To e-mail, remove the obvious
 
Reply With Quote
 
 
 
 
Christian
Guest
Posts: n/a

 
      01-25-2005, 02:51 PM
AcCeSsDeNiEd wrote:
> From outside, I can ping this new alias IP but I cannot access any services via this alias (e.g,
> telnet, pop, smtp..). my real .185.3 ip works.
>
> The alias IP of .185.4 is within my given block of IP addresses by my ISP.


so, you're sure, that pinging 165.9.185.4 really is *your* computer?
(traceroute!)

if this is verified, routing issues should not be an issue any more.
please have look if any services are actually bound to the new device:

$ netstat -anp | grep \:110 # for pop3...

what is the exact error mesage when you try to connect to a service?

--
BOFH excuse #243:

The computer fleetly, mouse and all.
 
Reply With Quote
 
AcCeSsDeNiEd
Guest
Posts: n/a

 
      01-27-2005, 03:56 AM
On Tue, 25 Jan 2005 16:51:32 +0100, Christian <news^@nerdbynature.de> wrote:

>so, you're sure, that pinging 165.9.185.4 really is *your* computer?
>(traceroute!)



Eh..yup. 'Cos only when I up the alias, then the IP would be pingable.

>
>if this is verified, routing issues should not be an issue any more.
>please have look if any services are actually bound to the new device:
>
>$ netstat -anp | grep \:110 # for pop3...
>
>what is the exact error mesage when you try to connect to a service?



# netstat -anp | grep \:25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3202/sendmail: acce
tcp 0 0 165.9.185.4:25 219.74.12.123:1412 SYN_RECV -

It seems as though a connection is being attempted but the packets are not going back to the source
(219.74.12.123)?

Could it be possible that my linux server is using the wrong gateway to talk back to 219.74.12.123 ?
But funny things is, I can ping with the reply pings coming back.

Since I have two internet ifaces, I recall I think I did do 'something' to make the packets use the
correct gateways. I looked at my iptables script/ip route I can't find anything.

How would tell the linux server to use gateway '165.9.185.1' for packets coming into ip
'165.9.185.4'.

Thanks.



To e-mail, remove the obvious
 
Reply With Quote
 
AcCeSsDeNiEd
Guest
Posts: n/a

 
      01-27-2005, 04:59 AM
Ok, I fixed it.
Had to dig through my memory and notes:


#/sbin/ip route add 165.9.185.0 dev eth2 src 165.9.185.4 table IPQ_eth2-0
#/sbin/ip route add default via 165.9.185.1 table IPQ_eth2-0
#/sbin/ip route add 165.9.185.0 dev eth2 src 165.9.185.4
#/sbin/ip rule add from 165.9.185.4 table IPQ_eth2-0


Thanks anyways

To e-mail, remove the obvious
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulated NAT Traversal on Virtual Box | Two Virtual Interface - eth-0/eth1 Sumit Linux Networking 0 06-24-2011 01:09 AM
Correct way to control alias of a NIC interface from application running as non-root Rohit Linux Networking 5 06-12-2007 09:18 PM
ip addr add vs. interface alias kianusch@gmail.com Linux Networking 4 04-10-2007 08:16 PM
IP Alias default outgoing interface? agentbullvi@gmail.com Linux Networking 3 12-28-2005 06:25 PM
Adding virtual NIC (ie: alias) to multi-homed server Brian Linux Networking 0 08-05-2005 12:48 PM



1 2 3 4 5 6 7 8 9 10 11