Re: no access to web server behind ipfw

2008-10-17 Thread Christer Hermansson

Chen Xu wrote:

$cmd 100 divert natd ip from any to any in via $pif
$cmd 101 check-state


  
You use in via $pif, I'm not 100% sure but I think you should only use 
via $pif.

# Authorized inbound packets
$cmd 421 allow tcp from any to 192.168.1.10 80 in via $pif setup limit
src-addr 5


  

I think it's bad to use statefull rules for inbound connections.

--

Christer Hermansson

http://www.chdevelopment.se


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Recompile kernel or module for ipfw+nat?

2008-09-24 Thread Christer Hermansson

n j wrote:

Hello everyone,

I have a quick question regarding the setup of nat with ipfw.
According to the handbook:

The following options must be in the kernel configuration file:
options IPFIREWALL
options IPDIVERT

however, there is a kernel module called ipdivert.ko similar to
ipfw.ko for the firewall.

Is it still necessary to recompile the kernel in order to use nat with
ipfw? Or, to put it another way, is there a possibility to use nat and
keep the generic kernel?

Thanks for any input,
  

You can choose to use the modules or make it static by recompile the kernel.

IMHO the ipnat(8) is a more simple way to get nat.

--

Christer Hermansson

http://www.chdevelopment.se


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to config ipv6 for this instance

2008-05-11 Thread Christer Hermansson

Xiaobo Zhu wrote:

thanks for your reply.
I install miredo and study the manual, it seems that the default setting of
midero works fine, so I just setup teredo as follows, but it still can't
work. would you please figure out what is wrong with it, or give me a
configuration guide in detail.
Thanks in advance!

// asign the ipv6 add
ifconfig teredo inet6 2001:da8:207:1:0:5efe.172.16.120.226
// setup the default router
ifconfig teredo isatap rtr 202.112.95.129

  
Like I said in my first post to this thread, I haven't tried this and I 
can't try this by my self for the moment (got no access to a 6-4 gateway 
what I'm aware about), however I think it's a interesting subject so I 
will probably try to test it in the future if I get the opportunity.


I was now reading little about it and found a posting 
http://article.gmane.org/gmane.network.ipv6.miredo.devel/174 so maybe it 
doesn't offer a working isatap client only a isatap server and you need 
the client, this posting say so but maybe that's only apply for linux.


The only tips I can give you is to check for any error messages in 
/var/log/messages and I would try to start it manual in xterm or on the 
console to see what's going on, as root /usr/local/sbin/miredo --foreground


Maybe it's better for you to continue the search for a solution in 
http://lists.freebsd.org/mailman/listinfo/freebsd-net the readers of 
that list are probably more into this subject.


--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to config ipv6 for this instance

2008-05-10 Thread Christer Hermansson

Xiaobo Zhu wrote:

Hi,
I have read the handbook and spent hours on the configuration of ipv6
on laptop, but still can't get it done.
The local network administrator only suggest the following steps to
setup ipv6 on windows xp and it works fine on that platform. I just
don't know to get it work on FreeBSD, would anyone guide me in detail
so I can also help the people aroud me.
Many thanks!
  
I haven't tried this but look in in the FreeBSD handbook (29.11.5.2 IPv6 
Router/Gateway Settings)


file:///usr/share/doc/en_US.ISO8859-1/books/handbook/index.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ipv6.html

--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to config ipv6 for this instance

2008-05-10 Thread Christer Hermansson

Wojciech Puchar wrote:

on laptop, but still can't get it done.
The local network administrator only suggest the following steps to
setup ipv6 on windows xp and it works fine on that platform. I just
don't know to get it work on FreeBSD, would anyone guide me in detail
so I can also help the people aroud me.
Many thanks!

// The following steps make ipv6 works fine on windows xp
ipv6 install
netsh  interface ipv6 isatap set router 202.112.95.129
netsh interface ipv6 add route ::/0 2 
2001:da8:207:1:0:5efe:202.112.95.129

no idea what is isatap

Wikipedia got a good description

http://en.wikipedia.org/wiki/ISATAP

--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to config ipv6 for this instance

2008-05-10 Thread Christer Hermansson

Christer Hermansson wrote:

Xiaobo Zhu wrote:

Hi,
I have read the handbook and spent hours on the configuration of ipv6
on laptop, but still can't get it done.
The local network administrator only suggest the following steps to
setup ipv6 on windows xp and it works fine on that platform. I just
don't know to get it work on FreeBSD, would anyone guide me in detail
so I can also help the people aroud me.
Many thanks!
I haven't tried this but look in in the FreeBSD handbook (29.11.5.2 
IPv6 Router/Gateway Settings)


file:///usr/share/doc/en_US.ISO8859-1/books/handbook/index.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ipv6.html 



Sorry !! I was looking more at the windows example and your config in 
your posting and missed that you already read the handbook.


--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to config ipv6 for this instance

2008-05-10 Thread Christer Hermansson

Xiaobo Zhu wrote:

Hi,
I have read the handbook and spent hours on the configuration of ipv6
on laptop, but still can't get it done.
The local network administrator only suggest the following steps to
setup ipv6 on windows xp and it works fine on that platform. I just
don't know to get it work on FreeBSD, would anyone guide me in detail
so I can also help the people aroud me.
Many thanks!

  


You should use Miredo ( /usr/ports/net/miredo )

That have a isatap implementation.

--

Christer Hermansson



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: about seamonkey

2008-05-07 Thread Christer Hermansson

Chuck Robey wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I was wondering if anyone here knew the answer, I have built seamonkey with
ports, but everytime I start it up, two windows pop up (the browser and the mail
window).  Seeing as I don't want the mailer EVER to pop up (I use thunderbird
for that), anyone know how I can suppress the seamoneky mail windows from
popping up?  I want to use it by default with eclipse, but as it stands now, I
can't do that.
  


Just want to make sure:

Have you checked the settings ?

Edit - Preferences... - Appearance - When SeaMonkey starts up, open

--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: DNS Problem

2008-05-01 Thread Christer Hermansson

Ruel Luchavez wrote:

when i resume it to its current configuration
Obtain DBS server automatically the problem is back, is this a problem in
my DNS server?
I'm using the FreeBSD 6.2 version...

I already restarted the DNS Server /etc/rc.d/named restart but nothing
happens the problem is still there..Is there any one here could help
me solve it?

  
I'm not sure but it seems that you are trying to use dhcp to receive the 
address of DNS-server.


Check the file /etc/resolv.conf ,this file should look like this:

nameserver 10.1.2.3
nameserver 10.4.5.6
nameserver 10.7.8.9

--

Christer Hermansson



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ Compiler On FreeBSD

2007-10-07 Thread Christer Hermansson

James Jeffery wrote:

Evening to you all (or morning in some parts of the world).

Im learning C++ from Sams Teach Yourself C++, now many will call this
a dumb method, and the books pointless and stupid, but i have no knowledge
of any lower level languages, so i do need to be spoon fed the basics.

Im using Borland C++ compiler on XP and was wondering what compilers
there are for FreeBSD that would allow me to compile and execute some
of the examples i will practise from the book.

Also if anyone wants to recommend any other books on C++ feel free. We
are learning VB at college at the moment, i like it, but its not machine
portable
and i dont like the whole drag and drop way of creating a program, seems
like
cheating.

Thanks for reading

James
  


The FreeBSD Developers' Handbook could be good to check out as well:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/tools-compiling.html

I think it's best to start with C and then move onto C++, however I use 
C for low level things with only textbased user interfaces and Java for 
things that require a GUI.


--

Christer Hermansson



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Cant send email using mail but it works telnetting...

2007-09-29 Thread Christer Hermansson

Agus wrote:

Hi list...

I gound a problem while trying to send an email with a script using mail -s
Subject [EMAIL PROTECTED]
Then i entered the data...finished with . but it gets stuck in the queue
with this...

V8
T1191019178
K1191020151
N2
P120418
I0/80/47582
MDeferred: Connection refused by himalaya.free-shells.com.ar.
Fbs
$_localhost [127.0.0.1]
$rESMTP
$severest.free-shells.com.ar
${daemon_flags}
${if_addr}127.0.0.1
S[EMAIL PROTECTED]
MDeferred: Connection refused by himalaya.free-shells.com.ar.
rRFC822; [EMAIL PROTECTED]
RPFD:[EMAIL PROTECTED]
H?P?Return-Path: 81g
H??Received: from everest.free-shells.com.ar (localhost [127.0.0.1])
by everest.free-shells.com.ar (8.13.6/8.13.6) with ESMTP id
l8SMdc7L021779
for [EMAIL PROTECTED]; Fri, 28 Sep 2007 19:39:38
-0300 (ART)
(envelope-from [EMAIL PROTECTED])
H??Received: (from [EMAIL PROTECTED])
by everest.free-shells.com.ar (8.13.6/8.13.6/Submit) id
l8SMdc3P021778
for [EMAIL PROTECTED]; Fri, 28 Sep 2007 19:39:38 -0300 (ART)
(envelope-from brahama)
H??Date: Fri, 28 Sep 2007 19:39:38 -0300 (ART)
H??From: User Brahama [EMAIL PROTECTED]
H??Message-Id: [EMAIL PROTECTED]
H??To: [EMAIL PROTECTED]
H??Subject: subjet
.



My hostname is everestmy firewall/router name is himalaya

I think the problem is that is trying to resolve to
himalaya.free-shells.com.ar which is the FQDN in my NS
could it be that? how can i bypass local mail to go directly to localhost
sendmail...?

Thanks...

PS: While telneting localhost 25 and sending it manually works
  

You want the mail to be delivered to the file /var/mail/username ?

I just typed at my machine (running freebsd and sendmail)

mail -s Testing [EMAIL PROTECTED]
hello
.

and the mail got delivered to the file /var/mail/cat

How is your sendmail configuration, I guess you have done some changes 
and not using the default ?


--

Christer Hermansson



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Cant send email using mail but it works telnetting...

2007-09-29 Thread Christer Hermansson

Agus wrote:

You want the mail to be delivered to the file /var/mail/username ?

I just typed at my machine (running freebsd and sendmail)

mail -s Testing [EMAIL PROTECTED]
hello
.

and the mail got delivered to the file /var/mail/cat

How is your sendmail configuration, I guess you have done some changes
and not using the default ?

--

Christer Hermansson



Hi Christer,



Thanks for the replyexactly that...i want the mail to be delivered to
[EMAIL PROTECTED] is i say...i got it stucked in the queue deferred

I didn't touch the sendmail conf..as far as i remember..also i dont know
much about sendmail conf so it would be difficult that i had modified
it...I'll check though

thanks...and have a nice weekend all

  

This is just a guess:

Maybe you have changed the line

# root: [EMAIL PROTECTED]

in the file /etc/mail/aliases

--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting to Sysinstall

2007-09-24 Thread Christer Hermansson

Jerahmy Pocott wrote:

Hello,

Okay so here is the situation:
Server has dead fd and cd drives, or maybe none at all. You want to 
install FreeBSD

on it.

The idea I had was to create a small partition, copy the contents of a 
cd into, set it

to boot off that partition, reboot and it would boot up into sysinstall.

Would this be possible? Or is it a dumb idea?


Boot from usb-memory
http://typo.submonkey.net/articles/2006/04/13/installing-freebsd-on-usb-stick-episode-2 



or use pxe
http://people.freebsd.org/~alfred/pxe/en_US.ISO8859-1/articles/pxe/article.html 



However I would choose to connect a CD-player
or
move the harddisk to some other machine that have a CD and do the 
install and then move the harddisk back.


--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Regular expressions

2007-08-18 Thread Christer Hermansson

Hi.

I'm trying to use regular expressions inside a shell script (/bin/sh) on 
my freebsd box and can't get it to work so I searched the web  and found 
http://regexlib.com/RETester.aspx


On this webpage I could test my pattern ^[A-Za-z0-9_-]+$ and 
everything was fine, did exactly what I wanted to do, check that a 
string only contains some combination of the characters A-Z, a-z, 0-9, 
hyphen - and underscore _.


I also found some basic example at 
http://www.grymoire.com/Unix/Sh.html#uh-88 :


88888

#!/bin/sh

echo Type in a number
read ans
number=`expr $ans : ([0-9]*)`
if [ $number != $ans ]; then
echo Not a number
elif [ $number -eq 0 ]; then
echo Nothing was typed
else
echo $number is a fine number
fi

88888

The above example doesn't work on my freebsd box. Maybe I need to update 
my system, sitting with 6.0R which never been updated.


Is there anyone who has some advice about how to get regular expressions 
to work in FreeBSD shell script ?


--

Christer Hermansson





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Regular expressions

2007-08-18 Thread Christer Hermansson

Derek Ragona wrote:

At 12:04 PM 8/18/2007, Christer Hermansson wrote:
I also found some basic example at 
http://www.grymoire.com/Unix/Sh.html#uh-88 :


88888

#!/bin/sh

echo Type in a number
read ans
number=`expr $ans : ([0-9]*)`
if [ $number != $ans ]; then
echo Not a number
elif [ $number -eq 0 ]; then
echo Nothing was typed
else
echo $number is a fine number
fi

88888

The above example doesn't work on my freebsd box. Maybe I need to 
update my system, sitting with 6.0R which never been updated.




You have a syntax error using expr.  Do a man on expr for more details 
but if you change that line from:

number=`expr $ans : ([0-9]*)`
to:
number=`expr $ans : \([0-9]*\)`

You will get the desired results.

Also when debugging scripts remember to add:
set -x
to your script on the second line, and see what the script lines are 
actually doing.


-Derek

Thanks Derek ! Now both the example and my own code works for me. I 
changed my code from ^[A-Za-z0-9_-]+$ to \([A-Za-z0-9_-]*\) It seems 
that FreeBSD's expr want some different syntax than the webbased test 
tool at http://regexlib.com/RETester.aspx


--

Christer Hermansson


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]