Re: nat and ipfw, port forwarding

2008-12-27 Thread Richard Yang
thank you, usleep (nice name)i somehow made it work by
1. add redirect_port udp 10.0.0.200:5 5 in natd.conf
2. allow all traffic and diversion in ipfw.rules

i tried to limit the traffic by modifying the rules in ipfw.rules,
but unsuccessfully. so i just leave it be at this moment.
i am very confused by the roles of natd and ipfw, and how they should work
together.

rich


On Sat, Dec 27, 2008 at 8:40 AM, usleepl...@gmail.com wrote:

 Hi Ricard,

 On Fri, Dec 26, 2008 at 9:27 PM, Richard Yang kusanagiy...@gmail.comwrote:

 hi,
 i have a ssh machine behind a freebsd firewall with nat and ipfw.
 how do i make port forwarding so internet can access the ssh machine?
 thanx


 i think you need to configure /etc/ipnat.conf ( read 'man ipnat' ). this is
 a example definition:
 rdr em1 0.0.0.0/0 port 2223 - 192.168.1.96 port 22

 ( this redirects incoming traffic on outside-interface em1 port 2223 to an
 internal machine on port 22 )

 also, include firewall_nat_enable in your rc.conf ( read 'man rc.conf' )

 to configure the settings from ipnat.conf, run ipnat -C -f
 /etc/ipnat.conf

 regards,

 usleep




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


nat and ipfw, port forwarding

2008-12-26 Thread Richard Yang
hi,
i have a ssh machine behind a freebsd firewall with nat and ipfw.
how do i make port forwarding so internet can access the ssh machine?
thanx

-- 

Best Regards

Richard Yang
richardy...@richardyang.net
kusanagiy...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


nessus report

2008-12-19 Thread Richard Yang
hi,
when i ran nessus against my bsd box, nessus can detect the remote host is
up.
i don't understand how nessus can detect it...
does anyone know how it is done?
thanx

rich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: nessus report

2008-12-19 Thread Richard Yang
yes,but i dpn't know how...
it looks to me that all ports are closed

On Fri, Dec 19, 2008 at 9:38 PM, michael michael.copel...@gmail.com wrote:



 Richard Yang wrote:

 hi,
 when i ran nessus against my bsd box, nessus can detect the remote host
 is
 up.
 i don't understand how nessus can detect it...
 does anyone know how it is done?
 thanx

 rich


 uh, maybe because it responded?

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





-- 

Best Regards

Richard Yang
richardy...@richardyang.net
kusanagiy...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


general question about setting up gateway

2008-12-19 Thread Richard Yang
hi,
i am trying to use freebsd as my home network gateway to the internet.
any good reference i should know besides what's in the handbook?
thanks

rich
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: nessus report

2008-12-19 Thread Richard Yang
i just used tcpdump.it doesn't capture anything package

On Fri, Dec 19, 2008 at 9:49 PM, Jeff Laine wtf.jla...@gmail.com wrote:

 On Fri, Dec 19, 2008 at 09:41:46PM -0800, Richard Yang wrote:
  yes,but i dpn't know how...
  it looks to me that all ports are closed
 
  On Fri, Dec 19, 2008 at 9:38 PM, michael michael.copel...@gmail.com
 wrote:
 
  
  
   Richard Yang wrote:
  
   hi,
   when i ran nessus against my bsd box, nessus can detect the remote
 host
   is
   up.
   i don't understand how nessus can detect it...
   does anyone know how it is done?
   thanx
  
   rich
  
  
   uh, maybe because it responded?
  

 Check your firewall settings and run tcpdump  to be sure your host not
 sending
 any replies after scan attempt.

 --
 Best regards,
 Jeff

 () X-mas ribbon campaign
 /\




-- 

Best Regards

Richard Yang
richardy...@richardyang.net
kusanagiy...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: nessus report

2008-12-19 Thread Richard Yang
i havent tried nmap yet, but you said it also detected the remote, though no
port is open?

On Fri, Dec 19, 2008 at 9:42 PM, Jeff Laine wtf.jla...@gmail.com wrote:

 On Fri, Dec 19, 2008 at 09:32:51PM -0800, Richard Yang wrote:
  hi,
  when i ran nessus against my bsd box, nessus can detect the remote host
 is
  up.
  i don't understand how nessus can detect it...
  does anyone know how it is done?
  thanx
 
  rich

 I can't tell about nessus but nmap does so after discovering any open
 ports,
 TCP RST responses from closed ports or ICMP responses from your host.
 I believe it's similar with the nessuss.


 --
 Best regards,
 Jeff

 () X-mas ribbon campaign
 /\




-- 

Best Regards

Richard Yang
richardy...@richardyang.net
kusanagiy...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: nessus report

2008-12-19 Thread Richard Yang
i ran a tcpdump.bsd box is responding to arp.
i guess this is fundamental, and should not be disabled
thanx guys

rich

On Fri, Dec 19, 2008 at 9:32 PM, Richard Yang kusanagiy...@gmail.comwrote:

 hi,
 when i ran nessus against my bsd box, nessus can detect the remote host is
 up.
 i don't understand how nessus can detect it...
 does anyone know how it is done?
 thanx

 rich




-- 

Best Regards

Richard Yang
richardy...@richardyang.net
kusanagiy...@gmail.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


problem killing a process with its pid

2008-09-14 Thread Richard Yang
I have been trying to kill the process by pulling natd.pid
below are 3 typical examples among a couple dozens I tried

kill -9 $(natd.pid)
Illegal variable name

kill -9 '/var/run/natd.pid'
kill: Arguments should be jobs or process id's

cat /var/run/natd.pid | kill -9
(no error returned, but natd process is still up)


could someone help?
thanks.


-- 

Best Regards

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


Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
Thank you :)
actually,
kill -9 $(cat /var/run/natd.pid |cut -d  -f1)
in a script
will work... (4 hours of work for this)


for some reason, 'kill' doesn't think 'cat natd.pid' is a valid pid.
i have to specially cut the first part out to get it straight
i am using csh

i tried your suggestions just now and below are the result

kill -9 `cat /var/run/natd.pid`
kill: Arguments should be jobs or process id's

kill -9 `cat /var/run/natd.pid|cut -d  -f1`
kill: Arguments should be jobs or process id's

what do you think is the reason?
i most certainly flunk my shell... hehe

rich


2008/9/14 Agus [EMAIL PROTECTED]

 2008/9/14 Richard Yang [EMAIL PROTECTED]:
  I have been trying to kill the process by pulling natd.pid
  below are 3 typical examples among a couple dozens I tried
 
  kill -9 $(natd.pid)
  Illegal variable name
 
  kill -9 '/var/run/natd.pid'
  kill: Arguments should be jobs or process id's
 
  cat /var/run/natd.pid | kill -9
  (no error returned, but natd process is still up)
 
 
  could someone help?
  thanks.
 
 
  --
 
  Best Regards
 
  Richard Yang
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
 

 Hi,

 I dont think this ways are correctly form...

 You probably want to kill the PID thats in that file, so the use as a
 variable, has no use...hehe

 kill -9 `cat /var/run/natd.pid`

 Notice the quotes aren simple..they are like an ascent towards the left

 that will probably work

 If not you can also use the xargs command in the last one u put,
 before the kill -9...

 Cheers,
 Brahama




-- 

Best Regards

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


Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
i just found i am on csh
thanks a lot anyway :)

2008/9/14 Yury Michurin [EMAIL PROTECTED]

 Try:
 kill -9 `cat /var/run/natd.pid`

 (works for me on tcsh)

 On Sun, Sep 14, 2008 at 9:33 AM, Richard Yang [EMAIL PROTECTED]wrote:

 I have been trying to kill the process by pulling natd.pid
 below are 3 typical examples among a couple dozens I tried

 kill -9 $(natd.pid)
 Illegal variable name

 kill -9 '/var/run/natd.pid'
 kill: Arguments should be jobs or process id's

 cat /var/run/natd.pid | kill -9
 (no error returned, but natd process is still up)


 could someone help?
 thanks.


 --

 Best Regards

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





-- 

Best Regards

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


Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
Another question,

why my $SHELL return csh, but only bash scripts work?
i am really really confused...

thanks
rich


2008/9/14 Richard Yang [EMAIL PROTECTED]

 please see below

 2008/9/14 Sahil Tandon [EMAIL PROTECTED]

 Richard Yang [EMAIL PROTECTED] wrote:

  I have been trying to kill the process by pulling natd.pid

 Is the rc script, which can be used to stop natd, not working?

 it is working. i am setting up natd rules, so i want to make sure updated
 rules apply :)


   below are 3 typical examples among a couple dozens I tried
 
  kill -9 $(natd.pid)
  Illegal variable name
 
  kill -9 '/var/run/natd.pid'
  kill: Arguments should be jobs or process id's
 
  cat /var/run/natd.pid | kill -9
  (no error returned, but natd process is still up)

 In bash, you could:

 # kill -9 $(cat /var/run/natd.pid)

 for some reason, i need
 kill -9 $(cat /var/run/natd.pid|cut -d  -f1)
 in a script and run the script to work...

 what is the equivalent, if i want to invoke it in command line under csh?
 thanks a lot





 --
 Sahil Tandon [EMAIL PROTECTED]




 --

 Best Regards

 Richard Yang
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]




-- 

Best Regards

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


Re: problem running named

2008-09-04 Thread Richard Yang
Thank you so much for this tip :)
it is just a simple syntax error in named.conf
it is running now
thank you so much!

2008/9/3 Sebastian Tymków [EMAIL PROTECTED]

 Hello,

 What is on logs ?
 What do you have in your /etc/rc.conf for named ?

 Best regards,

 Shamrock

 2008/9/3 Richard Yang [EMAIL PROTECTED]

 Hello,

 When I tried /etc/rc.d/named forcestart, i got
 ./named: WARNING: run_rc_command: cannot run /etc/namedb/named

 what does it mean and how do i fix this?
 thanx

 --

 Best Regards

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





-- 

Best Regards

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


Question on bind page

2008-09-02 Thread Richard Yang
Dear support,

I am trying to follow through
http://www.freebsd.org/doc/en/books/handbook/network-dns.html as to setup a
dns server
When I try
/etc/rc.d/named forcestart
it always said
Starting named

When I use ps to check whether it actually started, I can confirm it is not
started.
To start named is pretty much the first step before going to configure BIND.
I have to reinstall it and it still doesn't work.

Could you give me some hints?
Thank you.

-- 

Best Regards

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


problem running named

2008-09-02 Thread Richard Yang
Hello,

When I tried /etc/rc.d/named forcestart, i got
./named: WARNING: run_rc_command: cannot run /etc/namedb/named

what does it mean and how do i fix this?
thanx

-- 

Best Regards

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