Opening Ports in Fedora to allow Bittorent

Discussion in 'Installation/Configuration' started by sbovisjb1, Mar 21, 2006.

  1. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    I am running azureus and i have tried to open port 56912.... Its not working and i would like to know how...
     
  2. Jordy

    Jordy New Member

    opened them tcp & udp?
     
  3. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    Tried that...

    I tried to open ports in my router and manually... router config screen doesn't pop up. :confused:
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    Code:
    netstat -tap
     
  5. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    Here you go

    Here it is

    > (Not all processes could be identified, non-owned process info
    > will not be shown, you would have to be root to see it all.)
    > Active Internet connections (servers and established)
    > Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    > tcp 0 0 *:45476 *:* LISTEN -
    > tcp 0 0 *:sunrpc *:* LISTEN -
    > tcp 0 0 localhost.localdomain:60946 *:* LISTEN 30216/wish
    > tcp 0 0 localhost.localdomain:ipp *:* LISTEN -
    > tcp 0 0 localhost.localdomain:5335 *:* LISTEN -
    > tcp 0 0 localhost.localdomain:smtp *:* LISTEN -
    > tcp 1 0 192.168.1.100:35010 209.249.114.60.akamai.:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:42184 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:58142 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:58148 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:58150 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:58154 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:53401 209.249.114.67.akamai.:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:52831 209.249.115.124.akamai:http CLOSE_WAIT 4307/bash
    > tcp 0 0 192.168.1.100:55628 72.14.207.99:http ESTABLISHED 4060/firefox-bin
    > tcp 0 0 192.168.1.100:44314 baym-cs247.msgr.hotmai:1863 ESTABLISHED 30216/wish
    > tcp 1 0 192.168.1.100:43234 209.249.114.51.akamai.:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:42013 209.249.115.126.akamai:http CLOSE_WAIT 4307/bash
    > tcp 0 0 192.168.1.100:34819 h7252.serverkompetenz.:http TIME_WAIT -
    > tcp 0 0 192.168.1.100:34817 h7252.serverkompetenz.:http TIME_WAIT -
    > tcp 0 0 192.168.1.100:35719 216.39.69.100:http TIME_WAIT -
    > tcp 1 0 192.168.1.100:38083 209.249.114.52.akamai.:http CLOSE_WAIT 4307/bash
    > tcp 0 0 192.168.1.100:47966 209.249.115.117.akamai:http ESTABLISHED 4060/firefox-bin
    > tcp 1 0 192.168.1.100:33222 208.185.251.133.availa:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:33215 208.185.251.133.availa:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:55915 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:47662 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:47669 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    > tcp 1 0 192.168.1.100:51098 209.249.115.141.akamai:http CLOSE_WAIT 4307/bash
    > tcp 1 0 192.168.1.100:51099 209.249.115.141.akamai:http CLOSE_WAIT 4307/bash
    > tcp 0 0 192.168.1.100:39253 h7252.serverkompetenz.:http TIME_WAIT -
    > tcp 0 0 localhost.localdomain:6880 *:* LISTEN 4328/java
    > tcp 0 0 localhost.localdomain:45100 *:* LISTEN 4328/java
    > tcp 0 0 *:56912 *:* LISTEN 4328/java
    > tcp 0 0 *:ssh *:* LISTEN -
    > tcp 0 720 ::ffff:192.168.1.100:55404 ::ffff:68.54.55.181:18177 ESTABLISHED 4328/java
    > tcp 0 1260 ::ffff:192.168.1.100:47747 ip223-c3.gl.digi.pl:6881 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:42411 ppp127-20.lns2.bne3.i:60230 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:42252 82-171-136-130.dsl.ip.:6881 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:40040 ip565058b4.direct-adsl:6881 ESTABLISHED 4328/java
    > tcp 0 365 ::ffff:192.168.1.100:33398 151.80-202-222.nextge:26881 ESTABLISHED 4328/java
    > tcp 0 12030 ::ffff:192.168.1.100:41662 194-247-233-233.dynam:11208 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:53495 CPE00e0183b533e-CM000:30223 FIN_WAIT2 -
    > tcp 0 0 ::ffff:192.168.1.100:57315 ::ffff:71.224.241.58:50123 ESTABLISHED 4328/java
    > tcp 0 210 ::ffff:192.168.1.100:59245 adsl-69-149-171-228.ds:5123 ESTABLISHED 4328/java
    > tcp 0 1974 ::ffff:192.168.1.100:35352 ppp60-114.lns1.cbr1.i:32763
     
  6. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    The rest of it

    ESTABLISHED 4328/java
    > tcp 0 31 ::ffff:192.168.1.100:33588 69-88-217-9.thewavz.c:42366 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:43724 host86-140-65-81.rang:49152 ESTABLISHED 4328/java
    > tcp 0 0 ::ffff:192.168.1.100:36787 c-67-166-118-38.hsd1.u:9000 ESTABLISHED 4328/java
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:45476 *:* LISTEN -
    tcp 0 0 *:sunrpc *:* LISTEN -
    tcp 0 0 localhost.localdomain:60946 *:* LISTEN 30216/wish
    tcp 0 0 localhost.localdomain:ipp *:* LISTEN -
    tcp 0 0 localhost.localdomain:5335 *:* LISTEN -
    tcp 0 0 localhost.localdomain:smtp *:* LISTEN -
    tcp 1 0 192.168.1.100:35010 209.249.114.60.akamai.:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:42184 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:58142 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:58148 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:58150 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:58154 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:53401 209.249.114.67.akamai.:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:52831 209.249.115.124.akamai:http CLOSE_WAIT 4307/bash
    tcp 0 0 192.168.1.100:55628 72.14.207.99:http ESTABLISHED 4060/firefox-bin
    tcp 0 0 192.168.1.100:44314 baym-cs247.msgr.hotmai:1863 ESTABLISHED 30216/wish
    tcp 1 0 192.168.1.100:43234 209.249.114.51.akamai.:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:42013 209.249.115.126.akamai:http CLOSE_WAIT 4307/bash
    tcp 0 0 192.168.1.100:34819 h7252.serverkompetenz.:http TIME_WAIT -
    tcp 0 0 192.168.1.100:34817 h7252.serverkompetenz.:http TIME_WAIT -
    tcp 0 0 192.168.1.100:35719 216.39.69.100:http TIME_WAIT -
    tcp 1 0 192.168.1.100:38083 209.249.114.52.akamai.:http CLOSE_WAIT 4307/bash
    tcp 0 0 192.168.1.100:47966 209.249.115.117.akamai:http ESTABLISHED 4060/firefox-bin
    tcp 1 0 192.168.1.100:33222 208.185.251.133.availa:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:33215 208.185.251.133.availa:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:55915 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:47662 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:47669 xmlrpc.rhn.redhat.com:https CLOSE_WAIT 2886/python
    tcp 1 0 192.168.1.100:51098 209.249.115.141.akamai:http CLOSE_WAIT 4307/bash
    tcp 1 0 192.168.1.100:51099 209.249.115.141.akamai:http CLOSE_WAIT 4307/bash
    tcp 0 0 192.168.1.100:39253 h7252.serverkompetenz.:http TIME_WAIT -
    tcp 0 0 localhost.localdomain:6880 *:* LISTEN 4328/java
    tcp 0 0 localhost.localdomain:45100 *:* LISTEN 4328/java
    tcp 0 0 *:56912 *:* LISTEN 4328/java
    tcp 0 0 *:ssh *:* LISTEN -
    tcp 0 720 ::ffff:192.168.1.100:55404 ::ffff:68.54.55.181:18177 ESTABLISHED 4328/java
    tcp 0 1260 ::ffff:192.168.1.100:47747 ip223-c3.gl.digi.pl:6881 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:42411 ppp127-20.lns2.bne3.i:60230 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:42252 82-171-136-130.dsl.ip.:6881 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:40040 ip565058b4.direct-adsl:6881 ESTABLISHED 4328/java
    tcp 0 365 ::ffff:192.168.1.100:33398 151.80-202-222.nextge:26881 ESTABLISHED 4328/java
    tcp 0 12030 ::ffff:192.168.1.100:41662 194-247-233-233.dynam:11208 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:53495 CPE00e0183b533e-CM000:30223 FIN_WAIT2 -
    tcp 0 0 ::ffff:192.168.1.100:57315 ::ffff:71.224.241.58:50123 ESTABLISHED 4328/java
    tcp 0 210 ::ffff:192.168.1.100:59245 adsl-69-149-171-228.ds:5123 ESTABLISHED 4328/java
    tcp 0 1974 ::ffff:192.168.1.100:35352 ppp60-114.lns1.cbr1.i:32763 ESTABLISHED 4328/java
    tcp 0 31 ::ffff:192.168.1.100:33588 69-88-217-9.thewavz.c:42366 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:43724 host86-140-65-81.rang:49152 ESTABLISHED 4328/java
    tcp 0 0 ::ffff:192.168.1.100:36787 c-67-166-118-38.hsd1.u:9000 ESTABLISHED 4328/java
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Does maybe your firewall block port 56912?
     
  8. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    It blocks ALL

    The fedora firewall blocks all UDP.... Ive tried at least 10 ports and they're all blocked.....
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Then switch off the firewall for now to see if it works then.
     
  10. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    ummmmm......

    Ya the point is that i dont know how.... i would like to know what to do... you see that ive been doing stuff through the command i dont know how to SWITCH it of :eek:
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Do you see a firewall init script in /etc/init.d?

    Maybe there's also a firewall configuration file in /etc/sysconfig.
     
  12. dishawjp

    dishawjp New Member

    If you're asking how to temporarily turn iptables off, the command (by root) is:

    service iptables stop

    To restart, the command is:

    service iptables restart

    To see the current status if your firewall (iptables) the command is:

    service iptables status

    The Fedora-specific method is to use the command:
    system-config-securitylevel

    which will do the same thing (and more) with a little GUI applet.

    HTH,

    Jim
     
    Last edited: Mar 23, 2006
  13. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    Hmmm.... its good for now

    Yes thanks for that.... i forgot about that :eek: oh well.... but what ive been doing is stuff like this
    su -
    then
    /sbin/iptables -I INPUT -p tcp --destination-port 56912 -j ACCEPT
    then
    /sbin/iptables-save > /etc/sysconfig/iptables
    then
    /sbin/iptables -I INPUT -p udp --destination-port 56912 -j ACCEPT
    then
    /sbin/iptables-save > /etc/sysconfig/iptables
    then
    /sbin/iptables -L
    To see if my preferences were saved...

    But it didnt work...
    I would like to know a way to open port 56912.... with out shutting down the whole firewall.... if this doesnt work ill try my luck with ipCop....
     
  14. dishawjp

    dishawjp New Member

    Not positive if this is the isue or not, but if you have to add the "/sbin" directory to access iptables, then you are not root. By default, the /sbin directory is in root's path but not in a normal user's path. To change iptables, you need to be root.

    For example as a normal user:
    Code:
     dishawjp@linux:~> iptables --list
    bash: iptables: command not found
    
    But as root:
    Code:
    dishawjp@linux:~> su -
    Password:
    linux:~ # iptables --list
    Chain INPUT (policy DROP)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    input_ext  all  --  anywhere             anywhere
    input_ext  all  --  anywhere             anywhere
    LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-IN-ILL-TARGET '
    DROP       all  --  anywhere             anywhere
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination
    LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-FWD-ILL-ROUTING '
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere            state NEW,RELATED,ESTABLISHED
    LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-OUT-ERROR '
    
    Chain forward_ext (0 references)
    target     prot opt source               destination
    
    Chain input_ext (2 references)
    target     prot opt source               destination
    DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
    ACCEPT     icmp --  anywhere             anywhere            icmp source-quench
    ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp echo-reply
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp destination-unreachable
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp time-exceeded
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp parameter-problem
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp timestamp-reply
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp address-mask-reply
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp protocol-unreachable
    ACCEPT     icmp --  anywhere             anywhere            state RELATED,ESTABLISHED icmp redirect
    reject_func  tcp  --  anywhere             anywhere            tcp dpt:ident state NEW
    LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
    LOG        icmp --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
    LOG        udp  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
    LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 state INVALID LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT-INV '
    DROP       all  --  anywhere             anywhere
    
    Chain reject_func (1 references)
    target     prot opt source               destination
    REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
    REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
    REJECT     all  --  anywhere             anywhere            reject-with icmp-proto-unreachable
    linux:~ #
    
    So, if you *need* to add the /sbin to not get a "command not found" warning, you are probably not root. If you are not root, you cannot modify your iptables.

    HTH,

    Jim
     
  15. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    um i know that

    thanks but i sort of know that... but thanks for the help anyways!!
    :p:p ;)
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Use
    Code:
    system-config-securitylevel
    to configure the firewall, as dishawjp suggested.
     
  17. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    /sbin

    THANK YOU sooooo much
    I may not enjoy using iptables, so ill install ipCop or something... but is there a way to customise you're iptables, i mean because some commands i cant use ...
    ie config.d EVEN when im in root... and that makes me angry...
    I would like to know how to do this, because this way has been recommended to me before and if i could do that... thats one more thing that would help me to install linuxBIOS and Gentoo... it Spring Break :)
    :cool:
     
  18. falko

    falko Super Moderator Howtoforge Staff

    What commands do you mean?
     
  19. sbovisjb1

    sbovisjb1 Member HowtoForge Supporter

    I mean this....

    To go into the config files to edit delicate stuff..
    the quote is earlier on;)
     
  20. falko

    falko Super Moderator Howtoforge Staff

Share This Page