FreeBSD ipv6 client

Asuming your router is working correctly with the ip 
3ffe:80ee:5f8::/1 with a /64 range.

 * Give the interface "wi0" the ip 3ffe:80ee:5f8::2 with cidr 
prefix 64
ifconfig wi0 inet6 3ffe:80ee:5f8::2 prefixlen 64

 * Add default ipv6 gateway
route add -inet6 default 3ffe:80ee:5f8::1


And your on.



To automate this with the initscripts put this in rc.conf
ipv6_enable="YES"
ipv6_ifconfig_wi0="3ffe:80ee:5f8::2 prefixlen 64"
ipv6_defaultrouter="3ffe:80ee:5f8::1"

if youre with pcmcia you should put them in /etc/start_if.wi0 
instead and hack your rc.netw

Add the bold line.

    384         # Set up any static routes.
    385         case ${ipv6_defaultrouter} in
    386         [Nn][Oo] | '')
    387                 ;;
    388         *)
    389         ipv6_static_routes="default ${ipv6_static_routes}"
  390         ipv6_route_default="default ${ipv6_defaultrouter}"
391 ;;
392 esac
Udgivet i FreeBSD, Knowledge Base, Networking, Old Base | Skriv en kommentar

IPv6 router under FreeBSD

First set up the IPv6 native for the router(mostly done by tunneling)

XS26.net’s scripts

#!/bin/sh
#MYIPv4=”80.196.157.241″ # My IPv4 address
#XSIPv4=”62.61.157.209″ # PoP’s IPv4 address
#MYIPv6=”3ffe:80ee:5f8::1″ # Choose any IPv6 address from the range
# you’ve got from XS26
##TUNLIF=”gif0″

ifconfig gif0 create tunnel 80.196.157.241 62.61.157.209 up
route add -inet6 default -interface gif0
ifconfig lo0 inet6 3ffe:80ee:5f8::1 prefixlen 128

Then we need to compile firewall support for IPv6 into the kernel, add these and rebuild kernel:

options IPV6FIREWALL
options IPV6FIREWALL_VERBOSE

By default everything is disallowed so to allow everything(IMPORTENT: Just because almost nobody uses IPv6 you cant drop the security here, so you have to get back later to set up a prober firewall) type:

ip6fw add accept all from any to any

Then our local ipv6 is running, to share it we first have to make our local machines able to talk to each other trough ipv6, to do this the local interface have to have an ipv6 ip:

ifconfig rl0 inet6 3ffe:80ee:5f8::1 prefixlen 64

Note that this is the same ip as the machine has on the global interface, but here with 64 bit prefix instead meaning that the network 3ffe:80ee:5f8:: can be reached trough this interface.

Then enable routing by typing:
sysctl net.inet6.ip6.forwarding=1

and now it should be running, this can be done automaticly by a dirty litle quick hack in you init scripts, or you can try to figure out how to do as much as posible of it from standard initscripts.

This works in a pure setup, if you mix it with other technologies you might encounter odd problems which requires newthinking.

Udgivet i FreeBSD, Knowledge Base, Networking, Old Base | Skriv en kommentar

sparcstation 20 manual

http://docs.sun.com/db/doc/801-6189-12

Udgivet i Knowledge Base, Old Base, Retro hardware | Skriv en kommentar

Lyd i dstumbler freebsd

it uses the at speaker device not the dsp sound device. in freebsd
stable you need ‘pseudo-device speaker’ in your kernel config.

Udgivet i FreeBSD, Knowledge Base, Old Base | Skriv en kommentar

Wake On Lan Mini Howto

http://gsd.di.uminho.pt/jpo/software/wakeonlan/mini-howto/wol-mini-howto.html

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

Unix prompt in windows 2000

prompt %USERNAME%@%COMPUTERNAME%:$p$$

Udgivet i Uncategorized | Skriv en kommentar

Unix prompt in windows 2000

prompt %USERNAME%@%COMPUTERNAME%:$p$$
Udgivet i Knowledge Base, Windows | Skriv en kommentar

Hotswapping harddisks in freebsd

Officially you should have a 1000$ controller to do this, but i never saw a controller who could not do this. The only damage i have seen with hotswaping has been a wasted psu bicause the person who did the switch couldnt manage to put the cable straight in the plug.

potato# atacontrol list
ATA channel 0:
    Master:  ad0 <QUANTUM FIREBALL_TM3840A/A6B.2400> ATA/ATAPI rev 0
    Slave:       no device present
ATA channel 1:
    Master:      no device present
    Slave:       no device present
potato# atacontrol detach 1
(here i wend out and mounted a 15 gig IBM harddrive in the server)
potato# atacontrol attach 1
Master:  ad2 <IBM-DJNA-351520/J56OA30K> ATA/ATAPI rev 4
Slave:       no device present

And as you saw it detected the harddisk, now just partition and format it.

Udgivet i FreeBSD, Knowledge Base, Old Base | Skriv en kommentar

Normal SMTP operation

open connection to SMTP server (telnet smtp.foo.dns 25)
send:
–smtp start–
MAIL FROM:<dude@myserver.dk>
RCPT TO:<dude1@yourserver1.dk>
RCPT TO:<dude2@yourserver2.dk>
DATA
write the entire mail here
remember, this mail doesn’t got a header
which usually contains sender info and topic
end the conversation with a single dot on a line
after that you would probably like to close the connection
do that with a simple ‘QUIT’…
.
QUIT
–smtp stop–

that’s it!

a normal header for the mail could look like this:
–header start–
Delivered-To: reciever@domain.foo
Subject: subject
Date: Mon, 24 Mar 2003 11:14:55 +0100
From: “users real name” <user@smtp.foo>
To: <reciever@domain.foo>
Cc: <carboncopy@domain.foo>
–header stop–
but don’t rely on it

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

CoooL’s router

#!/bin/sh

  # default
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

  # flush
iptables -t filter -F INPUT
iptables -t filter -F FORWARD
iptables -t filter -F OUTPUT
iptables -t nat -F PREROUTING
iptables -t nat -F POSTROUTING

  # aktivere masquerade

iptables -t nat -A POSTROUTING -j MASQUERADE -p icmp
iptables -t nat -A POSTROUTING -j MASQUERADE -p udp
iptables -t nat -A POSTROUTING -j MASQUERADE -p tcp


iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 20 -j DNAT --to-destination 10.4.0.3
iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 21 -j DNAT --to-destination 10.4.0.3
iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 22 -j DNAT --to-destination 10.4.0.3
iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 25 -j DNAT --to-destination 10.4.0.3
iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 80 -j DNAT --to-destination 10.4.0.3
iptables -t nat -A PREROUTING -s ! 10.4.0.0/16 -p tcp --dport 110 -j DNAT --to-destination 10.4.0.3

 

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar