LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-29-2006, 01:18 AM   #1
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
haw i can open port 2121


hi all
i wont know haw can i open port 2121
i forget haw
can any one help me plz
 
Old 10-29-2006, 02:13 AM   #2
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 146

Rep: Reputation: 22
This question is a bit ambuigous but I assume you have a firewall and want to open it for that specific port (udp or tcp)

iptables -I INPUT -p tcp --dport 21212 -j ACCEPT
iptables -I INPUT -p udp --dport 21212 -j ACCEPT

you could test with a tool
nc -l -p 2121

and see what happens if your try a telnet from another machine

telnet YOURMACHINE 2121

I hope to make a right guess about what you nee
 
Old 10-29-2006, 02:27 AM   #3
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
bash-2.05b# ./nc
Cmd line: nc -l -p 2121
nc: forward host lookup failed: Host name lookup failure : Resource temporarily unavailable
 
Old 10-29-2006, 02:32 AM   #4
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 146

Rep: Reputation: 22
what is shown when you type hostname? I don't see much relation with nc anyway.

another way to see it

tcpdump -i any tcp port 2121
tcpdump -i any udp port 2121

as root will show all traffix on that port for all network interfaces
 
Old 10-29-2006, 02:34 AM   #5
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 146

Rep: Reputation: 22
what is shown when you type hostname? I don't see much relation with nc anyway.

another way to see it

tcpdump -i any tcp port 2121
tcpdump -i any udp port 2121

as root will show all traffix on that port for all network interfaces
 
Old 11-02-2006, 08:27 AM   #6
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
i see this massage

bash-2.05b# iptables -I INPUT -p tcp --dport 2121 -j ACCEPT
bash-2.05b# iptables -I INPUT -p udp --dport 2121 -j ACCEPT
bash-2.05b# cd /usr/bin
bash-2.05b# ./nc
Cmd line: nc -l -p 2121
nc: forward host lookup failed: Host name lookup failure : Resource temporarily unavailable
bash-2.05b#
 
Old 11-02-2006, 08:53 AM   #7
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
Quote:
Originally Posted by dr.dermann
...nc: forward host lookup failed: Host name lookup failure : Resource temporarily unavailable...
mmmmh, check this:
Do you have your machine's hostname listed in /etc/hosts with a proper IP address? That IP address can be localhost, 127.0.0.1

Also after the iptables commands, check with iptables -L -n to see if it is respecting your firewall rules.

Another way to open a port is to list it in the /etc/inetd.conf file though you have to assign it a service and restart the inetd server, after that of course you should configure your firewall accordingly if any, or nothing would reach the port.
 
Old 11-06-2006, 06:34 PM   #8
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Original Poster
Rep: Reputation: 0
iptables -L -n
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:2121
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2121

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 08:44 AM
newbe question haw do you install stuff and what extion msg4real Linux - Software 6 01-02-2005 08:39 PM
Haw can i run my C program in linux?? banana2 Linux - Software 6 02-08-2003 08:06 AM
Haw to disconnnect user? banana2 Linux - General 4 01-16-2003 09:58 PM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration