Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Sep 11, 2008 4:45 am 
Offline
Newbie

Joined: Thu Sep 11, 2008 1:46 am
Posts: 2
Hi,

I'm trying to get the IPv4 source address for SSHD connection however netstat is dropping the last octet.
---
root@node1:~# netstat -taupen | grep 22
tcp6 0 0 :::22 :::* LISTEN 0 1946 1276/sshd
tcp6 0 104 ::ffff:67.18.187.222:22 ::ffff:125.255.80.:3492 ESTABLISHED0 2014 1305/sshd: sharpeg
---

As I dont need to use IPv6 I tried disabling it (in /etc/modprobe.d/aliases):
---
# alias net-pf-10 ipv6 //Disabled IPv6 20080911
alias net-pf-10 off
alias ipv6 off
---

Didn't disable IPv6 however checking modules list there is nothing to disable (linode use motholithic kernels):
---
root@node1:~# lsmod
Module Size Used by
root@node1:~#
---

So guess I have two questions:
1. is it possible to get a kernel with IPv6 disabled?
2. how to find the IPv4 address of connections to my linode host?


Thanks


Last edited by dippa on Fri Sep 12, 2008 3:28 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Thu Sep 11, 2008 4:56 am 
Offline
Junior Member

Joined: Fri Jun 27, 2008 12:24 am
Posts: 31
You can disable IPv6 support for most services. For example, to disable it for SSHd edit your config and add the line "AddressFamily inet" and make sure "ListenAddress ::" is commented out. Restart the service and you should see only IPv4 addresses. Your current SSH session will still show in IPv6 format but only until you disconnect.


Top
   
 Post subject: Fixed!
PostPosted: Thu Sep 11, 2008 8:52 am 
Offline
Newbie

Joined: Thu Sep 11, 2008 1:46 am
Posts: 2
thanks SelfishMan the "ADdressFamily inet" did the job, "ListenAddress ::" was already commented out.

After a bit more investigating to the netstat -n truncation of the ip6 address I found an open bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=254243

For those that encounter the same thing under Debian Etch you can either:
- re-package the a patched net-tools or
- install the testing net-tools package which has the patch applied, which is what I did

I can now see the full ip6 address:
---
root@node1:~# netstat -taupen | grep 22
tcp6 0 0 :::22 :::* LISTEN 0 17027 2516/sshd
tcp6 0 0 67.18.187.222:22 220.239.42.204:1918 ESTABLISHED 0 17111 2543/sshd: sharpeg
tcp6 0 52 67.18.187.222:22 220.239.42.204:1917 ESTABLISHED 0 17035 2518/sshd: sharpeg
---


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group