Re: OpenBGPd multiple local AS

2013-01-17 Thread Peter Hessler
You can absolutely run external BGP and internal BGP with the same AS.
This is a very common configuration.


On 2013 Jan 17 (Thu) at 05:36:24 + (+), Войнович Андрей Александрович 
wrote:
:Hello!
:I have public AS and address range, everything is Ok, but now I want to
:connect my routers via LAN and announce my public networks between them.
:So I need to configure private AS and peers, as I think:
:
:R1:
:AS 5 65006
:# public ISP
:neighbor 1.1.1.1 {
:announce  self
:remote-as 4
:}
:# my private LAN peer
:neighbor 10.0.41.5 {
:announce self
:remote-as 65005
:descr   r2
:}
:
:And R2 router:
:AS 5 65005
:# public ISP
:neighbor 2.2.2.2 {
:announce  self
:remote-as 2
:}
:# my private LAN peer
:neighbor 10.0.41.6 {
:announce none
:remote-as 65006
:descr   r1
:}
:
:But when I restart bgpd, I receive error:
:Last error: AS unacceptable
:
:I suppose I have to force announcement of private AS for my private peer, but
:didn't find how to do it in config file.
:
:---
:Andrey
:

-- 
Last yeer I kudn't spel Engineer.  Now I are won.



named not answer on external query

2013-01-17 Thread lilit-aibolit
This is weird trouble. Years ago I did authoritative server on openbsd 
4.x and it's just works

for both - local network and queries from Internet.
But now it doesn't. I know - this is my issue, please help to resolve.
###named.conf###
// $OpenBSD: named-simple.conf,v 1.10 2009/11/02 21:12:56 jakob Exp $
acl tlk {
192.168.5.0/24;
192.168.55.0/24;
192.168.66.0/24;
192.168.99.0/24;
127.0.0.1; };
options {
version ;// remove this to allow version queries
listen-on { 127.0.0.1; 192.168.5.254; 192.168.55.254; ext_if; };
listen-on-v6 { none; };
allow-transfer { none; };
empty-zones-enable yes;
//forward first;
forwarders { provider's dns; };
allow-recursion { tlk; };
allow-query { any; };
};
view allow-recursion {
match-clients { tlk; };
//recursion yes;

zone . {
type hint;
file etc/root.hint; };

zone localhost {
type master;
file standard/localhost;
//allow-transfer { localhost; };
};

zone 127.in-addr.arpa {
type master;
file standard/loopback;
//allow-transfer { localhost; };
};

zone zone.1 {
type master;
file /master/zone.1; };

zone zone.2 {
type master;
file /master/zone.3; };

zone zone.4 {
type master;
file /master/zone.4; };

zone 168.192.in-addr.arpa {
type master;
file /master/168.192.in-addr.arpa; };

include /master/forbidden.conf;
};

view deny-recursion {
recursion no;
additional-from-cache no;
additional-from-auth no;
zone zone.5 {
type master;
file /master/zone.5; };
};

key rndc-key {
algorithm hmac-md5;
secret **;
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { rndc-key; };
};

logging {
channel security_channel {
# Send log messages to the specified file
filelog/security.log;
# Log all messages
severitydebug;
# Log the date and time of the message
print-time  yes;
# Log the category of the message
print-category  yes;
# Log the severity level of the message
print-severity  yes;
};

channel default {
# Send logs to the 'local0' syslog facility
syslog  local0;
# Log messages of severity 'info' or higher
severityinfo;
print-category  yes;
print-severity  yes;
};

# Logs about approval and denial of requests
category security {
security_channel;
default;
};

# Ignore logs about misconfigured remote servers
category lame-servers { null; };

# Default logging options
category default { default; };
};

###zone.5###
; $OpenBSD: db.localhost,v 1.2 2005/02/07 06:08:10 david Exp $
$ORIGIN zone.5.
$TTL 24h
@INSOAns1.zone.5. admin.zone.com. (
10; serial
1h; refresh
30m; retry
7d; expiration
1h ); minimum
NSns1.zone.5.
NSns2.zone.5.
@INAright.IP
wwwINAright.IP
ns1INAright.IP
ns2INAright.IP2


###pf.conf related rules###
pass in on $ext_if inet proto { tcp, udp } from any to em1 port domain
pass in on $int_if inet proto { udp, tcp } from lan to $int_if port { 
ntp, domain }

pass out on $ext_if inet proto udp from em1 to any

I see a numbers of external queries to my server, but don't see the answers:
# tcpdump -i em1 -p udp 'port domain'
09:28:23.152111 smtp.eurocom.su.19716  my.server.domain: 59597 [1au] A? 
www.zone.5. (45)
09:28:24.136607 idbh.ru.47793  my.server.domain: 26171% [1au] A? 
www.zone.5. (45)
09:28:26.942971 smtp.eurocom.su.44341  my.server.domain: 615 A? 
www.zone.5. (34)
09:28:27.191067 smtp.eurocom.su.17302  my.server.domain: 42979 [1au] A? 
www.zone.5. (45)
09:28:29.417383 smtp.eurocom.su.34958  my.server.domain: 53565 A? 
www.zone.5. (34)

09:28:29.737934 idbh.ru.45564  my.server.domain: 27837 A? www.zone.5. (34)

From local net:
user@pc.local:~$ nslookup
 zone.5
Server: 192.168.5.254
Address:192.168.5.254#53
Non-authoritative answer:
Name:   zone.5
Address: right.IP
# tcpdump -i em0 -p udp 'port domain'
10:00:41.702484 pc.local.46571  my.server.domain: 50830+ A? zone.5. (30)
10:00:41.702625 my.server.domain  pc.local.46571: 50830 1/2/0 A 
right.IP (82)




Re: OpenBGPd multiple local AS

2013-01-17 Thread Войнович Андрей Александрович
I think this would be, but I have the same public AS number on both ends (R1 
and R2 - 5), so BGPd will think that this is loop and will not accept this.

-Original Message-
From: Peter Hessler [mailto:phess...@theapt.org] 
Sent: Thursday, January 17, 2013 2:19 PM
To: Войнович Андрей Александрович
Cc: misc@openbsd.org
Subject: Re: OpenBGPd multiple local AS

You can absolutely run external BGP and internal BGP with the same AS.
This is a very common configuration.


On 2013 Jan 17 (Thu) at 05:36:24 + (+), Войнович Андрей Александрович 
wrote:
:Hello!
:I have public AS and address range, everything is Ok, but now I want to 
:connect my routers via LAN and announce my public networks between them.
:So I need to configure private AS and peers, as I think:
:
:R1:
:AS 5 65006
:# public ISP
:neighbor 1.1.1.1 {
:announce  self
:remote-as 4
:}
:# my private LAN peer
:neighbor 10.0.41.5 {
:announce self
:remote-as 65005
:descr   r2
:}
:
:And R2 router:
:AS 5 65005
:# public ISP
:neighbor 2.2.2.2 {
:announce  self
:remote-as 2
:}
:# my private LAN peer
:neighbor 10.0.41.6 {
:announce none
:remote-as 65006
:descr   r1
:}
:
:But when I restart bgpd, I receive error:
:Last error: AS unacceptable
:
:I suppose I have to force announcement of private AS for my private peer, but 
:didn't find how to do it in config file.
:
:---
:Andrey
:

--
Last yeer I kudn't spel Engineer.  Now I are won.



Re: OpenBGPd multiple local AS

2013-01-17 Thread Peter Hessler
BGP will build the map, and will use the most optimal paths to connect
to you, avoiding loops.  When one of the peers is unavailable, it will
recalculate its paths and select the best one.

BGP will accept this configuration, and will avoid loops.


On 2013 Jan 17 (Thu) at 08:34:00 + (+), Войнович Андрей Александрович 
wrote:
:I think this would be, but I have the same public AS number on both ends (R1 
and R2 - 5), so BGPd will think that this is loop and will not accept this.
:
:-Original Message-
:From: Peter Hessler [mailto:phess...@theapt.org] 
:Sent: Thursday, January 17, 2013 2:19 PM
:To: Войнович Андрей Александрович
:Cc: misc@openbsd.org
:Subject: Re: OpenBGPd multiple local AS
:
:You can absolutely run external BGP and internal BGP with the same AS.
:This is a very common configuration.
:
:
:On 2013 Jan 17 (Thu) at 05:36:24 + (+), Войнович Андрей Александрович 
wrote:
::Hello!
::I have public AS and address range, everything is Ok, but now I want to 
:connect my routers via LAN and announce my public networks between them.
::So I need to configure private AS and peers, as I think:
::
::R1:
::AS 5 65006
::# public ISP
::neighbor 1.1.1.1 {
::announce  self
::remote-as 4
::}
::# my private LAN peer
::neighbor 10.0.41.5 {
::announce self
::remote-as 65005
::descr   r2
::}
::
::And R2 router:
::AS 5 65005
::# public ISP
::neighbor 2.2.2.2 {
::announce  self
::remote-as 2
::}
::# my private LAN peer
::neighbor 10.0.41.6 {
::announce none
::remote-as 65006
::descr   r1
::}
::
::But when I restart bgpd, I receive error:
::Last error: AS unacceptable
::
::I suppose I have to force announcement of private AS for my private peer, but 
:didn't find how to do it in config file.
::
::---
::Andrey
::
:
:--
:Last yeer I kudn't spel Engineer.  Now I are won.

-- 
If you want to know what god thinks of money, just look at the people
he gave it to.
-- Dorothy Parker



Re: named not answer on external query

2013-01-17 Thread Vadim Zhukov
17.01.2013 12:31 пользователь lilit-aibolit
lilit-aibo...@mail.ru
написал:

 This is weird trouble. Years ago I did authoritative server on openbsd
4.x and it's just works
 for both - local network and queries from Internet.
 But now it doesn't. I know - this is my issue, please help to resolve.
 ###named.conf###
 // $OpenBSD: named-simple.conf,v 1.10 2009/11/02 21:12:56 jakob Exp $
 acl tlk {
 192.168.5.0/24;
 192.168.55.0/24;
 192.168.66.0/24;
 192.168.99.0/24;
 127.0.0.1; };
 options {
 version ;// remove this to allow version queries
 listen-on { 127.0.0.1; 192.168.5.254; 192.168.55.254; ext_if; };
 listen-on-v6 { none; };
 allow-transfer { none; };
 empty-zones-enable yes;
 //forward first;
 forwarders { provider's dns; };
 allow-recursion { tlk; };
 allow-query { any; };
 };
 view allow-recursion {
 match-clients { tlk; };
 //recursion yes;

 zone . {
 type hint;
 file etc/root.hint; };

 zone localhost {
 type master;
 file standard/localhost;
 //allow-transfer { localhost; };
 };

 zone 127.in-addr.arpa {
 type master;
 file standard/loopback;
 //allow-transfer { localhost; };
 };

 zone zone.1 {
 type master;
 file /master/zone.1; };

 zone zone.2 {
 type master;
 file /master/zone.3; };

 zone zone.4 {
 type master;
 file /master/zone.4; };

 zone 168.192.in-addr.arpa {
 type master;
 file /master/168.192.in-addr.arpa; };

 include /master/forbidden.conf;
 };

 view deny-recursion {
 recursion no;
 additional-from-cache no;
 additional-from-auth no;
 zone zone.5 {
 type master;
 file /master/zone.5; };
 };

 key rndc-key {
 algorithm hmac-md5;
 secret **;
 };

 controls {
 inet 127.0.0.1 port 953
 allow { 127.0.0.1; } keys { rndc-key; };
 };

 logging {
 channel security_channel {
 # Send log messages to the specified file
 filelog/security.log;
 # Log all messages
 severitydebug;
 # Log the date and time of the message
 print-time  yes;
 # Log the category of the message
 print-category  yes;
 # Log the severity level of the message
 print-severity  yes;
 };

 channel default {
 # Send logs to the 'local0' syslog facility
 syslog  local0;
 # Log messages of severity 'info' or higher
 severityinfo;
 print-category  yes;
 print-severity  yes;
 };

 # Logs about approval and denial of requests
 category security {
 security_channel;
 default;
 };

 # Ignore logs about misconfigured remote servers
 category lame-servers { null; };

 # Default logging options
 category default { default; };
 };

 ###zone.5###
 ; $OpenBSD: db.localhost,v 1.2 2005/02/07 06:08:10 david Exp $
 $ORIGIN zone.5.
 $TTL 24h
 @INSOAns1.zone.5. admin.zone.com. (
 10; serial
 1h; refresh
 30m; retry
 7d; expiration
 1h ); minimum
 NSns1.zone.5.
 NSns2.zone.5.
 @INAright.IP
 wwwINAright.IP
 ns1INAright.IP
 ns2INAright.IP2


 ###pf.conf related rules###
 pass in on $ext_if inet proto { tcp, udp } from any to em1 port domain
 pass in on $int_if inet proto { udp, tcp } from lan to $int_if port {
ntp, domain }
 pass out on $ext_if inet proto udp from em1 to any

 I see a numbers of external queries to my server, but don't see the
answers:
 # tcpdump -i em1 -p udp 'port domain'
 09:28:23.152111 smtp.eurocom.su.19716  my.server.domain: 59597 [1au] A?
www.zone.5. (45)
 09:28:24.136607 idbh.ru.47793  my.server.domain: 26171% [1au] A?
www.zone.5. (45)
 09:28:26.942971 smtp.eurocom.su.44341  my.server.domain: 615 A?
www.zone.5. (34)
 09:28:27.191067 smtp.eurocom.su.17302  my.server.domain: 42979 [1au] A?
www.zone.5. (45)
 09:28:29.417383 smtp.eurocom.su.34958  my.server.domain: 53565 A?
www.zone.5. (34)
 09:28:29.737934 idbh.ru.45564  my.server.domain: 27837 A? www.zone.5.
(34)

 From local net:
 user@pc.local:~$ nslookup
  zone.5
 Server: 192.168.5.254
 Address:192.168.5.254#53
 Non-authoritative answer:
 Name:   zone.5
 Address: right.IP
 # tcpdump -i em0 -p udp 'port domain'
 10:00:41.702484 pc.local.46571  my.server.domain: 50830+ A? zone.5. (30)
 10:00:41.702625 my.server.domain  pc.local.46571: 50830 1/2/0 A right.IP
(82)


At first, find where the flow gets stopped: enable debug logging on
resolver and add match log (matches) to port 53 rule as first one in your
firewall. Then probably you'll see the problem yourself.

Oh, and please, if you get no packets seen problems, print all of your
firewall rules. Always. Don't pretend that you know better - if it was so,
why would you asking ever?



Re: named not answer on external query

2013-01-17 Thread lilit-aibolit

On 01/17/2013 11:27 AM, Vadim Zhukov wrote:


At first, find where the flow gets stopped: enable debug logging on 
resolver and add match log (matches) to port 53 rule as first one in 
your firewall. Then probably you'll see the problem yourself.


Oh, and please, if you get no packets seen problems, print all of 
your firewall rules. Always. Don't pretend that you know better - if 
it was so, why would you asking ever?



Incoming packets still coming, but I see only my request to provider's DNS.
Should I see reply from my server to request from Internet?

Jan 17 13:31:44.480883 rule 4/(match) match in on em1: 
178.45.248.150.43780  my.IP.53: 687[|domain]
Jan 17 13:33:25.076188 rule 4/(match) match in on em1: 
212.14.176.40.33699  my.IP.53: 61511[|domain] (DF)
Jan 17 13:33:25.080570 rule 4/(match) match in on em1: 
212.14.176.40.19055  my.ip.53: 3658[|domain]
Jan 17 13:33:26.216774 rule 4/(match) match out on em1: my.ip.9342  
194.106.219.12.53: 10130+% [1au][|domain]
Jan 17 13:33:26.721533 rule 4/(match) match out on em1: my.ip.42595  
194.106.219.10.53: 21720+% [1au][|domain]



###pf.conf###
#$OpenBSD: pf.conf,v 1.50 2011/04/28 00:19:42 mikeb Exp $
# See pf.conf(5) for syntx and examples.
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.

ext_if = em1
wifi_if = rum0
int_if = em0

portstuff = { smtps, 5190, submission, pop3, pop3s, imap, imaps, www, 
https, 1863, 1935, 3389, 5222, 5900, 8200 }
portstuffwww = { smtps, 445, 5190, submission, pop3, pop3s, imap, 
imaps, www, https, 1863, 1935, 3389, 5222, 9100 }


table firewall const { self }
table tlv_lan{ 192.168.2.0/24 }
table tlv_wifi{ 192.168.22.0/24 }
table tlk_lan{ 192.168.5.0/24 }
table tlk_wifi{ 192.168.55.0/24 }
table tlv_gw{ x.x.x.x }
table admin{ 192.168.5.1, 192.168.5.61 }
table dns{ 194.106.219.10, 194.106.219.12 }
table tlv_vpn{ 192.168.88.0/24 }
table tlk_vpn{ 192.168.99.0/24 }
table pptp_vpn{ 192.168.66.0/24 }
#table adminvpn{ 192.168.14.115, 192.168.14.113 }
table rm{ 192.168.5.250 }
table tlv_rm{ 192.168.2.250 }
table mysql{ 192.168.5.248 }
table tlv_mysql{ 192.168.2.248 }
table tlk_scm{ 192.168.5.251 }
table tw{ 192.168.2.247 }
table lic{ 192.168.5.246 }
table ogo{ 192.168.5.36 }
table macintosh{ 192.168.5.73 }
table scm{ 192.168.5.251 }
table tlv_scm{ 192.168.2.251 }
table psu{ 192.168.5.17, 192.168.5.50 }
table tlk_qnap{ 192.168.5.200 }
table tlv_qnap{ 192.168.2.200 }
table proxmox{ 192.168.5.201 }
table bugzilla{ 192.168.2.206 }
table agcoclient{ 192.168.5.15, 192.168.5.32, 192.168.5.34, \
192.168.5.35, 192.168.5.41, 192.168.5.42, 192.168.5.49, 
192.168.5.72 }

table agco{x.x.x.x }
table private{ 0.0.0.0/8, 10.0.0.0/8, 14.0.0.0/8, \
127.0.0.0/8, 128.0.0.0/16, 169.254.0.0/16, \
172.16.0.0/12, 191.255.0.0/16, 192.0.2.0/24, \
192.168.0.0/16, 240.0.0.0/4, 255.255.255.0/24 }
table bruteforce persist
#table advertisement file /etc/advertisement
table spamd-white persist
table spamd persist
#table spamd-bypass file /etc/mail/spamd.bypass
#table spamd-black file /etc/mail/spamd.black

set skip on  { lo, enc0 }
set loginterface em1
set timeout { frag 20, tcp.established 3600 }
set block-policy return

antispoof quick for { em1 }

match in all scrub (no-df)

anchor ftp-proxy/*
match log on $ext_if inet proto udp to port 53
#nat
match out on $ext_if inet proto tcp from { tlk_lan, tlk_wifi, 
pptp_vpn } to any nat-to em1
match out on $ext_if inet proto udp from { tlk_lan, tlk_wifi } to 
agco nat-to em1

match out on $ext_if inet from admin to any nat-to em1

#rdr
match in on $ext_if inet proto tcp from any to em1 port { www, https } 
rdr-to rm
match in on $ext_if inet proto tcp from any to em1 port 3690 rdr-to 
scm port www
match in on $ext_if inet proto tcp from any to em1 port 16881 rdr-to 
192.168.5.1
match in on $ext_if inet proto udp from any to em1 port 27015 rdr-to 
192.168.5.244
match in on $ext_if inet proto tcp from any to em1 port 8080 rdr-to 
192.168.5.244 port www


#block in quick on $int_if from any to advertisement
block quick proto tcp flags /S
block quick proto tcp flags A/A
block in quick on $ext_if from { bruteforce, private, spamd-black 
} to any

block out quick on $ext_if from any to private
#block in quick on $int_if inet proto tcp from { !twmail, !twtest } 
to any port smtp

block all

#in
pass in on $ext_if inet proto tcp from any to em1 port 22555
pass in on $ext_if proto esp from tlv_gw to em1
pass in on $ext_if proto gre from any to em1
pass in on $ext_if inet proto tcp from any to em1 port pptp modulate state
pass in on $ext_if inet proto udp from any to em1 port 1194
pass in on $ext_if inet proto tcp from any to rm port { www, https } 
synproxy state

pass in on $ext_if 

Re: I need a little more Enlightenment

2013-01-17 Thread Stefan Sperling
On Wed, Jan 16, 2013 at 10:50:36AM +1100, Rod Whitworth wrote:
 On Tue, 15 Jan 2013 11:33:54 +0100, Stefan Sperling wrote:
 The dmesg you quoted is from 5.2. Please show the -current dmesg from
 the USB stick install which actually has the problem.
 
  I was not clear enough. I only ran the USB boot to see if the problem
 with losing video on the Vcons was fixed. 
 
 The problem is with the 5.2 release not running E. It works well with
 several WMs but when X is running you have to work blind on the Vcons.
 
 I just wanted to see if X in a recent snapshot still hid the other
 consoles and it doesn't so my new Tpad is on its way. Meanwhile I just
 want to play with E as it comes with 5.2 release so that I can learn
 how to config and use E. Then I'll be ready to do testing of your .17
 versions when the new Tpad is here.

The e17 port in 5.2 is an alpha release. So I suspect you are seeing
a bug in that alpha release when you try to run e17 on 5.2.
To try the e17 0.17.0 release, you have to run -current.

 I have another unrelated question about the machine:
 
  Realtek RTS5209 Card Reader rev 0x01 at pci3 dev 0 function 0 not
  configured
  sdhc0 at pci3 dev 0 function 1 Realtek RTS5209 Card Reader rev 0x01:
  apic 2 int 19
  sdmmc0 at sdhc0
 
 Does the card reader work in 5.2? Does it work in -current?
 
 No. Same dmesg lines.

Same dmesg lines in -current as in 5.2? I very much doubt that.
Are you sure you were trying a -current kernel?
I would expect -current to show something like:

  rtsx0 at pci3 dev 0 function 0 Realtek RTS5209 Card Reader rev 0x01: apic 0 
int 18
  sdmmc0 at rtsx0
  Realtek RTS5209 Card Reader rev 0x01 at pci3 dev 0 function 1 not configured

See http://marc.info/?l=openbsd-techm=135732675613607w=2
(the diff has been committed)



Re: named not answer on external query

2013-01-17 Thread Michael Lambert
On 17 Jan 2013, at 06:44, lilit-aibolit wrote:

 On 01/17/2013 11:27 AM, Vadim Zhukov wrote:
 
 At first, find where the flow gets stopped: enable debug logging on resolver 
 and add match log (matches) to port 53 rule as first one in your firewall. 
 Then probably you'll see the problem yourself.

 match log on $ext_if inet proto udp to port 53

Don't you want:

match log on $ext_if inet proto {tcp, udp} to port 53

Michael



how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread WANG Siyuan
Hi,

I install gcc 4.7 on openbsd using pkg_add. after installation, I use
'gcc -v' to check, I found it is also gcc 4.2 !

how to upgrade gcc 4.2 to gcc 4.7 on openbsd? thank you!


--
Yours sincerely,
WANG Siyuan



Re: named not answer on external query

2013-01-17 Thread lilit-aibolit

On 01/17/2013 04:05 PM, Michael Lambert wrote:

On 17 Jan 2013, at 06:44, lilit-aibolit wrote:


On 01/17/2013 11:27 AM, Vadim Zhukov wrote:

At first, find where the flow gets stopped: enable debug logging on resolver and add 
match log (matches) to port 53 rule as first one in your firewall. Then 
probably you'll see the problem yourself.

match log on $ext_if inet proto udp to port 53

Don't you want:

match log on $ext_if inet proto {tcp, udp} to port 53

Michael


.


done. but this didn't help me.
I also see incoming request from Internet and request from my server to 
provider's DNS forwarders.

I'm sure that named running on all my interfaces:
# netstat -na | grep .53
tcp  0  0  ext.ip.53  *.*LISTEN
tcp  0  0  127.0.0.1.953  *.*LISTEN
tcp  0  0  192.168.55.254.53  *.*LISTEN
tcp  0  0  192.168.5.254.53   *.*LISTEN
tcp  0  0  127.0.0.1.53   *.*LISTEN
udp  0  0  ext.ip.53  *.*
udp  0  0  192.168.55.254.53  *.*
udp  0  0  192.168.5.254.53   *.*
udp  0  0  127.0.0.1.53   *.*
# fstat | grep internet | grep named
namednamed  21647   20* internet stream tcp 0xd89db198 127.0.0.1:53
namednamed  21647   21* internet stream tcp 0xd89db000 
192.168.5.254:53
namednamed  21647   22* internet stream tcp 0xd89db330 
192.168.55.254:53

namednamed  21647   23* internet stream tcp 0xd89db4c8 127.0.0.1:953
namednamed  21647   25* internet stream tcp 0xd88a17fc ext.ip:53
namednamed  21647  512* internet dgram udp 127.0.0.1:53
namednamed  21647  513* internet dgram udp 192.168.5.254:53
namednamed  21647  514* internet dgram udp 192.168.55.254:53
namednamed  21647  515* internet dgram udp *:13169
namednamed  21647  516* internet dgram udp ext.ip:53



Re: how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread Janne Johansson
2013/1/17 WANG Siyuan wangsiyuanb...@gmail.com:
 Hi,

 I install gcc 4.7 on openbsd using pkg_add. after installation, I use
 'gcc -v' to check, I found it is also gcc 4.2 !
 how to upgrade gcc 4.2 to gcc 4.7 on openbsd? thank you!

The non-system gcc ends up in /usr/local/bin
Edit your PATH accordingly.
And don't compile the base system with the non-system compiler.

-- 
May the most significant bit of your life be positive.



Re: how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread Ville Valkonen
On 17 January 2013 16:29, WANG Siyuan wangsiyuanb...@gmail.com wrote:
 Hi,

 I install gcc 4.7 on openbsd using pkg_add. after installation, I use
 'gcc -v' to check, I found it is also gcc 4.2 !

 how to upgrade gcc 4.2 to gcc 4.7 on openbsd? thank you!


 --
 Yours sincerely,
 WANG Siyuan

Hi,

packages/ports gcc is renamed to egcc that it won't be mixed up to
system's gcc. Therefore, /usr/local/bin/ecpp is one that you want. And
no, you DON'T want to replace system's gcc.

--
Sincerely,
Ville Valkonen



Re: how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread Brad Smith
On Thu, Jan 17, 2013 at 03:57:48PM +0100, Janne Johansson wrote:
 2013/1/17 WANG Siyuan wangsiyuanb...@gmail.com:
  Hi,
 
  I install gcc 4.7 on openbsd using pkg_add. after installation, I use
  'gcc -v' to check, I found it is also gcc 4.2 !
  how to upgrade gcc 4.2 to gcc 4.7 on openbsd? thank you!
 
 The non-system gcc ends up in /usr/local/bin
 Edit your PATH accordingly.
 And don't compile the base system with the non-system compiler.

You don't need to edit your PATH. The GCC 4.7 binaries are installed
as egcc / eg++.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread Daniel Bolgheroni
On Thu, Jan 17, 2013 at 10:29:16PM +0800, WANG Siyuan wrote:
 Hi,
 
 I install gcc 4.7 on openbsd using pkg_add. after installation, I use
 'gcc -v' to check, I found it is also gcc 4.2 !

Try egcc -v.




Re: how to upgrade gcc 4.2.1 to gcc-4.7.1

2013-01-17 Thread WANG Siyuan
Thank you!
I just want to build a software on openbsd.

On Thu, Jan 17, 2013 at 10:58 PM, Ville Valkonen weezeld...@gmail.com wrote:
 On 17 January 2013 16:29, WANG Siyuan wangsiyuanb...@gmail.com wrote:
 Hi,

 I install gcc 4.7 on openbsd using pkg_add. after installation, I use
 'gcc -v' to check, I found it is also gcc 4.2 !

 how to upgrade gcc 4.2 to gcc 4.7 on openbsd? thank you!


 --
 Yours sincerely,
 WANG Siyuan

 Hi,

 packages/ports gcc is renamed to egcc that it won't be mixed up to
 system's gcc. Therefore, /usr/local/bin/ecpp is one that you want. And
 no, you DON'T want to replace system's gcc.

 --
 Sincerely,
 Ville Valkonen



--
Yours sincerely,
WANG Siyuan



Assembler in openbsd is different from Linux ?

2013-01-17 Thread WANG Siyuan
Hi,
I want to build a software on openbsd. But I get this error:

src/util.c: Assembler messages:
src/util.c:93: Error: `%es:(%di)' is not a valid 32 bit base/index expression

This project is developed on Linux. How to install assembler used in   Linux?
Thank you!
--
Yours sincerely,
WANG Siyuan



Re: Assembler in openbsd is different from Linux ?

2013-01-17 Thread WANG Siyuan
Hi, unixeric
Thank you for replay.
I check the error. It is GCC inline assembly.
I set CC as egcc in Makefile, Why this happen? This project could
build on Linux.
Thank you!

On Thu, Jan 17, 2013 at 11:52 PM, unix unixe...@club-internet.fr wrote:
 Le 17/01/2013 16:27, WANG Siyuan a écrit :

 Hi,
 I want to build a software on openbsd. But I get this error:

 src/util.c: Assembler messages:
 src/util.c:93: Error: `%es:(%di)' is not a valid 32 bit base/index
 expression

 This project is developed on Linux. How to install assembler used in
 Linux?
 Thank you!
 --
 Yours sincerely,
 WANG Siyuan



 you must install gmake and may be gawk
 the construction on linux is slightly different on OpenBSD
 # pkg_add gmake
 and type gmake instead of make




-- 
Yours sincerely,
WANG Siyuan



Re: OpenBGPd multiple local AS

2013-01-17 Thread Stuart Henderson
On 2013-01-17, Войнович Андрей Александрович andr...@skbkontur.ru wrote:
 Hello!
 I have public AS and address range, everything is Ok, but now I want to
 connect my routers via LAN and announce my public networks between them.
 So I need to configure private AS and peers, as I think:

A typical network running BGP does not use any private AS numbers.

I would highly recommend you read some introductory BGP guides.
BGP by Iljitsch van Beijnum (O'Reilly) is fairly good - all the
config examples are cisco, but the concepts are general.



pf: ICMP Ping with no state flag set not working

2013-01-17 Thread Jummo
Hi,

I have just upgraded a OpenBSD 4.7 firewall to 5.2. The system routes 
between $net1 and $net2 with pf enabled. After the upgrade ping request 
from $net1 to $net2 get stuck (and vice versa). Only the first icmp 
echo-req from $net1 to $net2 get answered by a icmp echo-reply, all 
subsequent icmp echo-req are seen on the $net1 interface of the firewall 
but no log message in pflog0 or on the $net2 interface.

I use the no state flag for the rules, because the default gateway is not 
this system.

pass out
pass in log on $net1_if inet from $net1 to $net2 no state
pass in log on $net2_if inet from $net2 to $net1 no state

I have solved the problem with dedicated ICMP rules after the rules above.

pass in log on $net1_if proto icmp from $net1 to $net2
pass in log on $net2_if proto icmp from $net2 to $net3

Why is only the first ping ok with no state flag set at the pass rule?

Thanks,
Patrick



Re: Running OpenBSD on Raspberry Pi

2013-01-17 Thread Mihai Popescu
On Sat, Jan 12, 2013 at 4:59 AM, Patrick Wildt  wrote:
 Hello,

 I'm currently working on porting OpenBSD to the Freescale i.MX6, an ARM
 Cortex-A9 (1-4 cores).
 It is already supporting USB and SDMMC, works like a charm.
 The i.MX6 itself got some interesting features like PCIe, SATA and Gigabit
 Ethernet.

 So, if 200$ don't sound too much, that might be an alternative.

 So, where is your diff?

Is it right to have diffs here? It is another arch ...



Re: I need a little more Enlightenment

2013-01-17 Thread Rod Whitworth
On Thu, 17 Jan 2013 14:13:09 +0100, Stefan Sperling wrote:

On Wed, Jan 16, 2013 at 10:50:36AM +1100, Rod Whitworth wrote:
 On Tue, 15 Jan 2013 11:33:54 +0100, Stefan Sperling wrote:
 The dmesg you quoted is from 5.2. Please show the -current dmesg from
 the USB stick install which actually has the problem.
 
  I was not clear enough. I only ran the USB boot to see if the problem
 with losing video on the Vcons was fixed. 
 
 The problem is with the 5.2 release not running E. It works well with
 several WMs but when X is running you have to work blind on the Vcons.
 
 I just wanted to see if X in a recent snapshot still hid the other
 consoles and it doesn't so my new Tpad is on its way. Meanwhile I just
 want to play with E as it comes with 5.2 release so that I can learn
 how to config and use E. Then I'll be ready to do testing of your .17
 versions when the new Tpad is here.

The e17 port in 5.2 is an alpha release. So I suspect you are seeing
a bug in that alpha release when you try to run e17 on 5.2.
To try the e17 0.17.0 release, you have to run -current.

Several hours before you wrote this reply I grabbed the current AMD64
install CD and loaded on the USB stick that I had been using to check
that the blank vcons bug was fixed.

There was a glitch in the install with xshare failing during extraction
but I got around that by doing an upgrade using a nearby mirror and
only selecting that set.

The reason I grabbed the amd64 version is that the packages associated
with it are compiled shortly after the date of the install CD.

I then pkg_add-ed E17 and it runs but I am no way clued up enough to
comment on its behaviour and that will have to wait for my new Tpad.

Do you have any idea just how slowly usb booted  machines are? I
started pkg_add for E17 before I started preparing dinner and it
finished well after we had finished eating and cleaned up. It's OK for
a quick check as I needed to see if current was free of the invisible
vcon bug but not much else.


 I have another unrelated question about the machine:
 
  Realtek RTS5209 Card Reader rev 0x01 at pci3 dev 0 function 0 not
  configured
  sdhc0 at pci3 dev 0 function 1 Realtek RTS5209 Card Reader rev 0x01:
  apic 2 int 19
  sdmmc0 at sdhc0
 
 Does the card reader work in 5.2? Does it work in -current?
 
 No. Same dmesg lines.

Same dmesg lines in -current as in 5.2? I very much doubt that.
Are you sure you were trying a -current kernel?
I would expect -current to show something like:

  rtsx0 at pci3 dev 0 function 0 Realtek RTS5209 Card Reader rev 0x01: apic 
 0 int 18
  sdmmc0 at rtsx0
  Realtek RTS5209 Card Reader rev 0x01 at pci3 dev 0 function 1 not 
 configured

I was running current but I just scanned for  Card Reader and saw the
not configured message and that usually means it ain't going to work.
So I can't swear as to the full message as I overwrote that i386
install with the amd64 one. Sorry. But it isn't working if it is not
configured, is it?


See http://marc.info/?l=openbsd-techm=135732675613607w=2
(the diff has been committed)


I'm not doing any more research on this topic until I have a machine
that I can dedicate to the work and it will be running on a SATA drive.

Thanks for your work and I hope that I can do some real testing for you
in the future.

*** NOTE *** Please DO NOT CC me. I am subscribed to the list.
Mail to the sender address that does not originate at the list server is 
tarpitted. The reply-to: address is provided for those who feel compelled to 
reply off list. Thankyou.

Rod/
---
This life is not the real thing.
It is not even in Beta.
If it was, then OpenBSD would already have a man page for it.



Re: snapshots total freeze (linux emulation)

2013-01-17 Thread frantisek holop
hmm, on Tue, Jan 15, 2013 at 02:42:55PM -0800, Philip Guenther said that
 On Fri, Dec 28, 2012 at 1:07 PM, Philip Guenther guent...@gmail.com wrote:
  On Fri, Dec 28, 2012 at 8:57 AM, frantisek holop min...@obiit.org wrote:
 ...
  savecore came on and i have in the logs:
 
  Dec 28 00:25:25 amaaq savecore: reboot after panic: kernel diagnostic 
  assertion wp-wp_new_futex == f failed: file 
  ../../../../compat/linux/linux_futex.c, line 568
 
  Excellent.  The next question is whether that's the only bug that
  you're hitting, or if there's something else going on that should also
  be debugged.
 
  As for that particular failed assertion, it would be interesting to
  know what the actual values of wp-wp_mew_futex was (if it was NULL,
  then I have a guess as to the bug; if it wasn't NULL, then uh, good
  luck!)
 
 The fix for this has been committed, at least if it's the
 wp-wp_new_futex==NULL case.

installing snapshot...
thanks for looking into this

-f
-- 
drink till she's cute.  stop before you get married.