LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2012, 05:04 AM   #1
aminbaik
Member
 
Registered: Feb 2012
Posts: 44

Rep: Reputation: Disabled
allow port


hello,
i have install cent os and openvpn access server
i tird to check if the port 1194 is open but i'ts give me that it's closed.
i am using this website : http://www.yougetsignal.com/tools/open-ports/
so what i have to do to make all ports open? i want to test with many ports
so i dont want to make rule on every port.
so what i have to do ?
thanks.
 
Old 02-26-2012, 05:07 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Why would you want to have every single port open? You know that is bad security, right?

And instead of using a site to check your ports, I recommend using nmap - You can download through your distro's package manager.

As far as your "port issue" so to speak, you need to edit your iptables configuration. I haven't used CentOS for a bit, but your configuration *should* be located in /etc/sysconfig/iptables. Can you please provide me the output of the following command, using code tags?
Code:
iptables -L
Cheers,

Josh
 
Old 02-26-2012, 05:11 AM   #3
aminbaik
Member
 
Registered: Feb 2012
Posts: 44

Original Poster
Rep: Reputation: Disabled
hello,
this the resulat:
num target prot opt source destination

Chain AS0_MANGLE_PRE_REL_EST (1 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_MANGLE_TUN (1 references)
num target prot opt source destination
1 MARK all -- 0.0.0.0/0 0.0.0.0/0 MARK set 0x2000000
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:3389
2 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1194
3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1194
4 AS0_ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 AS0_ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
6 AS0_IN_PRE all -- 0.0.0.0/0 0.0.0.0/0 MARK match 0x2000000/0x2000000
7 AS0_ACCEPT tcp -- 0.0.0.0/0 208.67.18.35 state NEW tcp dpt:915
8 AS0_ACCEPT tcp -- 0.0.0.0/0 208.67.18.35 state NEW tcp dpt:914
9 AS0_ACCEPT udp -- 0.0.0.0/0 208.67.18.35 state NEW udp dpt:917
10 AS0_ACCEPT udp -- 0.0.0.0/0 208.67.18.35 state NEW udp dpt:916
11 AS0_WEBACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
12 AS0_WEBACCEPT tcp -- 0.0.0.0/0 208.67.18.35 state NEW tcp dpt:943

Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 AS0_ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 AS0_IN_PRE all -- 0.0.0.0/0 0.0.0.0/0 MARK match 0x2000000/0x2000000
3 AS0_OUT_S2C all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
1 AS0_OUT_LOCAL all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_ACCEPT (7 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_IN (4 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 5.5.0.1
2 AS0_IN_POST all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_IN_POST (1 references)
num target prot opt source destination
1 AS0_OUT all -- 0.0.0.0/0 0.0.0.0/0
2 DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_IN_PRE (2 references)
num target prot opt source destination
1 AS0_IN all -- 0.0.0.0/0 5.5.0.0/20
2 AS0_IN all -- 0.0.0.0/0 192.168.0.0/16
3 AS0_IN all -- 0.0.0.0/0 172.16.0.0/12
4 AS0_IN all -- 0.0.0.0/0 10.0.0.0/8
5 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_OUT (2 references)
num target prot opt source destination
1 DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_OUT_LOCAL (1 references)
num target prot opt source destination
1 DROP icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 5
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_OUT_S2C (1 references)
num target prot opt source destination
1 AS0_OUT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_WEBACCEPT (2 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Table: nat
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
1 AS0_NAT_PRE_REL_EST all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 AS0_DPFWD_UDP udp -- 0.0.0.0/0 208.67.18.35 udp dpt:3389 state NEW
3 AS0_DPFWD_TCP tcp -- 0.0.0.0/0 208.67.18.35 tcp dpt:443 state NEW

Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination
1 AS0_NAT_POST_REL_EST all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 AS0_NAT_PRE all -- 0.0.0.0/0 0.0.0.0/0 MARK match 0x2000000/0x2000000

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

Chain AS0_DPFWD_TCP (1 references)
num target prot opt source destination
1 DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 to:208.67.18.35:914
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_DPFWD_UDP (1 references)
num target prot opt source destination
1 DNAT udp -- 0.0.0.0/0 0.0.0.0/0 to:208.67.18.35:916
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_NAT (2 references)
num target prot opt source destination
1 SNAT all -- 0.0.0.0/0 0.0.0.0/0 to:208.67.18.35
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_NAT_POST_REL_EST (1 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_NAT_PRE (1 references)
num target prot opt source destination
1 AS0_NAT_TEST all -- 0.0.0.0/0 5.5.0.0/20
2 AS0_NAT_TEST all -- 0.0.0.0/0 192.168.0.0/16
3 AS0_NAT_TEST all -- 0.0.0.0/0 172.16.0.0/12
4 AS0_NAT_TEST all -- 0.0.0.0/0 10.0.0.0/8
5 AS0_NAT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_NAT_PRE_REL_EST (1 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain AS0_NAT_TEST (4 references)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
2 ACCEPT all -- 0.0.0.0/0 5.5.0.0/20
3 AS0_NAT all -- 0.0.0.0/0 0.0.0.0/0

[root@ov ~]#
[root@ov ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:ms-wbt-server
ACCEPT udp -- anywhere anywhere udp dptpenvpn
ACCEPT udp -- anywhere anywhere udp dptpenvpn
AS0_ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
AS0_ACCEPT all -- anywhere anywhere
AS0_IN_PRE all -- anywhere anywhere MARK match 0x2000000/0x2000000
AS0_ACCEPT tcp -- anywhere ov.aminbaik.com state NEW tcp dpt:915
AS0_ACCEPT tcp -- anywhere ov.aminbaik.com state NEW tcp dpt:914
AS0_ACCEPT udp -- anywhere ov.aminbaik.com state NEW udp dpt:917
AS0_ACCEPT udp -- anywhere ov.aminbaik.com state NEW udp dpt:916
AS0_WEBACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
AS0_WEBACCEPT tcp -- anywhere ov.aminbaik.com state NEW tcp dpt:943

Chain FORWARD (policy ACCEPT)
target prot opt source destination
AS0_ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
AS0_IN_PRE all -- anywhere anywhere MARK match 0x2000000/0x2000000
AS0_OUT_S2C all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
AS0_OUT_LOCAL all -- anywhere anywhere

Chain AS0_ACCEPT (7 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere

Chain AS0_IN (4 references)
target prot opt source destination
ACCEPT all -- anywhere 5.5.0.1
AS0_IN_POST all -- anywhere anywhere

Chain AS0_IN_POST (1 references)
target prot opt source destination
AS0_OUT all -- anywhere anywhere
DROP all -- anywhere anywhere

Chain AS0_IN_PRE (2 references)
target prot opt source destination
AS0_IN all -- anywhere 5.5.0.0/20
AS0_IN all -- anywhere 192.168.0.0/16
AS0_IN all -- anywhere 172.16.0.0/12
AS0_IN all -- anywhere 10.0.0.0/8
ACCEPT all -- anywhere anywhere

Chain AS0_OUT (2 references)
target prot opt source destination
DROP all -- anywhere anywhere

Chain AS0_OUT_LOCAL (1 references)
target prot opt source destination
DROP icmp -- anywhere anywhere icmp redirect
ACCEPT all -- anywhere anywhere

Chain AS0_OUT_S2C (1 references)
target prot opt source destination
AS0_OUT all -- anywhere anywhere

Chain AS0_WEBACCEPT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere

i want to accept all trafic to server from anyway i am know that is a risk but is just for test.
thanks.
 
Old 02-26-2012, 05:17 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Well just to test, you could always temporarily disable your firewall briefly. And can you please edit your post and use code tags?
 
Old 02-26-2012, 05:18 AM   #5
aminbaik
Member
 
Registered: Feb 2012
Posts: 44

Original Poster
Rep: Reputation: Disabled
how i can disable it ?
 
Old 02-26-2012, 05:22 AM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
As root:
Code:
service iptables stop

(to start)

service iptables start
 
Old 02-26-2012, 05:44 AM   #7
aminbaik
Member
 
Registered: Feb 2012
Posts: 44

Original Poster
Rep: Reputation: Disabled
hello,
i stoped but still now it's give me that it's blocked
also i tried witn nmap !
i think that i have to make it run and forward it
how i can do it ?
thanks.
 
Old 02-26-2012, 06:29 AM   #8
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
have you started the openvpn service to run and wait for connections ?
 
  


Reply



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
SFTP server port blocked on Uni network, need to change the listening port. sammyboy161 Linux - Newbie 2 10-21-2010 12:03 PM
LXer: LD Port Report Project aka Switch Port Mapper Tool LXer Syndicated Linux News 0 05-10-2009 07:11 PM
Configuring Automatic Redirects from port 80 to port 443 with bundled Apache server kaplan71 Fedora 1 12-28-2007 08:30 AM
--destination-ports port[,port[,port...]] KevinGuy Linux - Networking 1 03-16-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration