Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sure that in my network I will not use IPv6 only IPv4. So according to the KISS principle I will need to disable it. How can I do it? OS is OpenBSD 5.1.

share|improve this question
up vote 2 down vote accepted
 -inet6          Disable inet6(4) on the given interface and remove all
                 configured inet6(4) addresses, including the link-local
                 ones.  To turn it on again, assign any inet6 address or
                 run rtsol(8).

this if from `man ifconfig'.

 family      Specify which type of Internet protocol family to prefer, if
             a host is reachable using different address families.  By
             default IPv4 addresses are queried first, and then IPv6
             addresses.  The syntax is:

                   family family1 [family2]

             A maximum of two families can be specified, where family can
             be any of:

                   inet4     IPv4 queries.
                   inet6     IPv6 queries.

this is from `man resolv.conf'

Custom kernel is not OpenBSD way to go! Do not ever ask for help with custom kernel, you don't understand technical details anyway :)

share|improve this answer
    
While you're probably right regarding the technical details part, I don't see how this kind of elitism will ever help anyone. – schaiba Mar 23 at 7:09

You must build a custom kernel that lacks the INET6 option. But the OpenBSD maintainers seem to advise against this.

share|improve this answer
    
aren't there any solution to "blacklist" IPv6 support? The only solution is to build a custom kernel? – gasko peter May 9 '12 at 2:46
    
Well, if you mean packet filtering, I think you can use pf.conf to filter against any protocol that's in /etc/protocols and ipv6 is in there. I haven't tried it, however. – Kyle Jones May 9 '12 at 2:58
    
Proposing customer kernel is bad, especially for people who even don't know anything about it. OpenBSD is well prepared to just work. If you are not filtering IPv6 in firewall anyway, or any outgoing traffic then what kind of admin you are? IIRC teredo on M$ creates its own IPv6 tunneled outgoing traffic = nice backdoor in your private network. According to a survey only 20 % of network administrators really know what kind of data is leaving their network :-) This is ridiculous, especially when everybody is obsessed with filtering incomming ports scan etc. – Jiri Xichtkniha May 18 '12 at 20:09

How to disable IPv6 on OpenBSD?

# uname -a
OpenBSD cacti-i386.my.domain 5.0 GENERIC.MP#59 i386

1). Step

# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33196
        priority: 0
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr xx:xx:xx:xx:xx:xx
        priority: 0
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex,master)
        status: active
        inet 10.0.0.100 netmask 0xffffff00 broadcast 10.0.0.255
        inet6 fe80::20c:29ff:fe35:b831%em0 prefixlen 64 scopeid 0x1
enc0: flags=0<>
        priority: 0
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33196
        priority: 0
        groups: pflog

2). Step

# ifconfig em0 inet6 fe80::20c:29ff:fe35:b831  delete

3). Step edit /etc/rc.local add this line

# vi /etc/rc.local
#       $OpenBSD: rc.local,v 1.44 2011/04/22 06:08:14 ajacoutot Exp $

# Site-specific startup actions, daemons, and other things which
# can be done AFTER your system goes into securemode.  For actions
# which should be done BEFORE your system has gone into securemode
# please see /etc/rc.securelevel.

ifconfig em0 inet6 fe80::20c:29ff:fe35:b831  delete
share|improve this answer
    
How to format code/terminal-output on Stack Exchange? Select the block and press Ctrl+K. – Anthon Mar 23 at 5:57
    
I am not sure wether a switch reboot will bring the IPv6 back. you forgot the loopback. – Rui F Ribeiro Mar 23 at 7:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.