Skip to contentSkip to conversation

unable to re-configure?

DISCUSSION Mike Giggey 3 participants 4 messages Jun 27, 2005 – Jun 28, 2005

lore
Share & tools
lore
#0 lore raw

trying to set up an openvpn connection on a box with iptables

Would like to get port 1194 open (UDP).

I have tried various ways --usually the best way seems to be editing the /etc/sysconf/iptables file and restarting the service.

I have tried to verify with nmap --but no success.

I would greatly appreciate any advise on how to open this port...

(p.s. sorry for such a newbie-class question)

Thanks in advance

Here is some output:

[root@here]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere
ACCEPT     ipv6-auth--  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:1194
[root@here]# /sbin/iptables -V
iptables v1.2.11
#1 lore raw
Quoted 15 lines

Would like to get port 1194 open (UDP).

[root@here]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)

Quoted 11 lines
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere
ACCEPT     ipv6-auth--  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:1194

I guess the problem is tha you ACCEPT udp/1194 after you already REJECTed. You should accept it before.

REJECT, (man iptables learns), is a "terminating TARGET, ending rule transversal"

*:-)

Signature · 3 lines
Sandro Dentella  *:-)
e-mail: [email protected] 
http://www.tksql.org                    TkSQL Home page - My GPL work
#2 lore raw
Quoted 5 lines · Sandro Dentella

I guess the problem is tha you ACCEPT udp/1194 after you already REJECTed. You should accept it before.

REJECT, (man iptables learns), is a "terminating TARGET, ending rule transversal"

Thanks! Good point!

I corrected for this; restarted and get the same problem.

{iptables}

[root@here]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)

target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere
ACCEPT     ipv6-auth--  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:1194
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

{nmap}

[root@there]# nmap -sU -p U:1194  {ip of here}

Starting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2005-06-27 11:00 EDT Interesting ports on here (ip of here):
PORT STATE SERVICE
1194/udp closed unknown

Nmap run completed -- 1 IP address (1 host up) scanned in 0.842 seconds

#3 lore raw
Quoted 7 lines · Mike Giggey

{nmap}

[root@there]# nmap -sU -p U:1194  {ip of here}

Starting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2005-06-27 11:00 EDT Interesting ports on here (ip of here):
PORT STATE SERVICE
1194/udp closed unknown

and:

netstat -lnu

shows the machine listening on UDP port 1194?

-j

--
"Stewie: Well, I'd love to stay and chat, but you're a bitch."
--Family Guy