how to open specific port

Dear members,
My release is open Solaris b103
1- How to know the opening port in my system
2- How to open a specific port like port number 53
3- How to closed the specific port like port number 53

Your feedback highly appreciated

netstat -an | grep LISTEN will show ports currently open.

As for how to open/close ports - depends on application you are running if/how you can assign specific port to the application config files.

Dear PMM:-
My problem is be sure that the port number 53 is opening cause
When I try to access the internet I have the following :-
# ping 4.2.2.2
4.2.2.2 is alive
# ping Yahoo!
Ping: unknown host ww.yahoo.com
So when I put the Yahoo! at the browser it can�t be open
When I use this command
# dig Yahoo!
I got the real IP for yahoo home page when and put it in the browser the browser the yahoo home page is open but when i try to open any link it can't be open
After I check with my ISP cause no body from his customer service can be support UNIX system one of them say to me please check port 53 if open to retrieve DNS service or not cause my problem in DNS
Your feedback is highly appreciated

It looks like you don't have a DNS server setup - you need to access this server on port 53, you don't need to run port 53 on your client.

Try running

  • my output is below:
$ nslookup www.unix.com
Server:         10.226.1.1
Address:        10.226.1.1#53

Non-authoritative answer:
Name:   www.unix.comAddress: 81.17.242.186

Check /etc/resolv.conf where it sets up DNS

Check whether your /etc/nsswitch.conf has a "hosts: files dns" entry. Without this your machine will not perform DNS lookups for hostnames. Look in /etc/nsswitch.dns file for sample "hosts" entry.

all right and we used the cross over cable to ping the machine but did not work..

try unplumbing and re-plumbing you network interface(s). also, if you change the nsswitch.conf file, restart nscd via svcadm.

Dear Frozentin:-
i try to restart nscd service vi svcadm
when i try to start this service
svcs -a | grep nscd
i didn't find it
so restart this servive by this way
/etc/inet.d/nscd
when i try to search for this agin with
svcs -a | grep nscd

sorry i didn't know how to use /etc/nsswitch.conf

Note:-
when i try to access internet with DHCP service all thing will working right

Dear Member;
when i searching on the internet and submit the problem in a lot of forum
i for the solution

OpenSolaris depend on NIS service when need to determine to resolve the domain name

this linke explain the subject
http://en.wikipedia.org/wiki/Network...mation_Service
and this is the command that resolve my problem

cp /etc/nsswitch.dns /etc/nsswitch.conf
svcadm enable svc:/network/dns/client:default                
svcadm restart system/name-service-cache:default 

Correct link...

Network Information Service - Wikipedia, the free encyclopedia

[quote=dellroxy;302295699]

OpenSolaris depend on NIS service when need to determine to resolve the domain name

Sorry but DNS lookups does not depend on NIS, you can use NIS for name resolution within your own network but that won't help resolve names on the Net.

If you can ping something using its IP address the then the network is okay as you showed:
ping 4.2.2.2
4.2.2.2 is alive

The problem is due to failed DNS lookups as was shown:
# ping www.yahoo.com
Ping: unknown host Yahoo!

As has already been stated you need to mention dns in the hosts line in /etc/nsswitch.conf and you need to populate the /etc/resolv.conf with at the very least a line specifying a DNS server's IP address, e.g.:
nameserver 4.2.2.1

If you do not know what DNS server you should be using, then use the ones provided by OpenDNS | Providing A Safer And Faster Internet so the lines in /etc/resolv.conf would be:
nameserver 208.67.222.222
nameserver 208.67.220.220

Confirm you can ping them and you should be up and running if not confirm that no firewall is blocking things by running:

$ telnet 208.67.222.222 53

If you see the response as below:
Trying 208.67.222.222...
Connected to 208.67.222.222.
Escape character is '^]'.

Then you have connected to the DNS server at 208.67.222.222 on port 53, if it just hangs and you do not see the "Escape caharacter is '^'" then you have not managed to connect to the DNS server and a firewall may be blocking port 53.

Tony Fuller