LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 10-29-2006, 02:18 AM   #1
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0
haw i can open port 2121


[Log in to get rid of this advertisement]
hi all
i wont know haw can i open port 2121
i forget haw
can any one help me plz
dr.dermann is offline     Reply With Quote
Old 10-29-2006, 03:13 AM   #2
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 119
Thanked: 0
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
tlowk is offline     Reply With Quote
Old 10-29-2006, 03:27 AM   #3
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0

Original Poster
bash-2.05b# ./nc
Cmd line: nc -l -p 2121
nc: forward host lookup failed: Host name lookup failure : Resource temporarily unavailable
dr.dermann is offline     Reply With Quote
Old 10-29-2006, 03:32 AM   #4
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 119
Thanked: 0
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
tlowk is offline     Reply With Quote
Old 10-29-2006, 03:34 AM   #5
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 119
Thanked: 0
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
tlowk is offline     Reply With Quote
Old 11-02-2006, 09:27 AM   #6
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0

Original Poster
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#
dr.dermann is offline     Reply With Quote
Old 11-02-2006, 09:53 AM   #7
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Thanked: 0
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.
raska is offline     Reply With Quote
Old 11-06-2006, 07:34 PM   #8
dr.dermann
LQ Newbie
 
Registered: Oct 2006
Posts: 7
Thanked: 0

Original Poster
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
dr.dermann is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


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 09:44 AM
newbe question haw do you install stuff and what extion msg4real Linux - Software 6 01-02-2005 09:39 PM
Haw can i run my C program in linux?? banana2 Linux - Software 6 02-08-2003 09:06 AM
Haw to disconnnect user? banana2 Linux - General 4 01-16-2003 10:58 PM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 01:16 PM


All times are GMT -5. The time now is 05:13 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration