View Full Version : Opening Ports in Fedora to allow Bittorent
sbovisjb1
21st March 2006, 00:21
I am running azureus and i have tried to open port 56912.... Its not working and i would like to know how...
Jordy
21st March 2006, 15:18
I am running azureus and i have tried to open port 56912.... Its not working and i would like to know how...
opened them tcp & udp?
sbovisjb1
21st March 2006, 17:09
I tried to open ports in my router and manually... router config screen doesn't pop up. :confused:
falko
21st March 2006, 18:09
Please post the output of netstat -tap
sbovisjb1
22nd March 2006, 00:43
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
sbovisjb1
22nd March 2006, 00:44
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
falko
22nd March 2006, 17:32
Does maybe your firewall block port 56912?
sbovisjb1
22nd March 2006, 23:50
The fedora firewall blocks all UDP.... Ive tried at least 10 ports and they're all blocked.....
falko
23rd March 2006, 00:10
Then switch off the firewall for now to see if it works then.
sbovisjb1
23rd March 2006, 04:57
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 :o
falko
23rd March 2006, 08:47
Do you see a firewall init script in /etc/init.d?
Maybe there's also a firewall configuration file in /etc/sysconfig.
dishawjp
23rd March 2006, 14:24
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
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
sbovisjb1
23rd March 2006, 14:31
Yes thanks for that.... i forgot about that :o 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....
dishawjp
23rd March 2006, 15:08
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:
dishawjp@linux:~> iptables --list
bash: iptables: command not found
But as root:
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
sbovisjb1
23rd March 2006, 17:13
thanks but i sort of know that... but thanks for the help anyways!!
:P:p ;)
falko
23rd March 2006, 17:25
Use
system-config-securitylevel
to configure the firewall, as dishawjp suggested.
sbovisjb1
23rd March 2006, 21:32
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:
falko
23rd March 2006, 22:11
What commands do you mean?
sbovisjb1
24th March 2006, 00:04
To go into the config files to edit delicate stuff..
the quote is earlier on;)
falko
24th March 2006, 08:38
To edit files on the command line, use vi (as root). Have a look here: http://www.howtoforge.com/faq/12_15_en.html
dishawjp
24th March 2006, 18:39
If you prefer a "fancier" GUI way to configure iptables, there is this:
http://www.fs-security.com/
program. It's called Firestarter, uses a wizard to help you throught firewall configuration and has some additional functionality as well. I've never used it myself, but my kids use it on their Linux boxes and they have good things to say about it.
Like Falco, I tend to just write the rules and/or use vi to edit the actual iptables rules file.
Jim
sbovisjb1
25th March 2006, 07:27
Yes i completley agree with you... i you commands to edit my iptables, but it does not seem to be working... For Azureus there are some tricky and complicated things i have to allow APART from the desired port (56912) and so on. It would be nice to use this so that i can fiddle with a few settings trying to get them to work. I have my iptables disabled as of now and in my opinion that does not front very good security. Well thank you for all the help you users have given me. I think that i should let this thread die on its own. If any one wants to add any comments ill be glad to answer. My reasons for this is because i believe that their isnt much more to discuess going short of deviating of the topic...
THANK YOU AGAIN
sbovisjb1
25th March 2006, 15:55
If you have not already opened tcp ports 6881 through 6999 in your Fedora firewall for another bittorrent application such as the one described above open the terminal. Type:
su -
Hit enter. Type your root password. Hit enter. Type:
/sbin/iptables -I INPUT -p tcp --destination-port 6881:6999 -j ACCEPT
Hit enter. This adds a rule to open TCP ports 6881 through 6999 in your firewall. These ports are required by bittorent and/or Azureus. Type:
/sbin/iptables-save > /etc/sysconfig/iptables
Hit enter. This saves the rule. You must also open udp port 6881 for Azureus. Type:
/sbin/iptables -I INPUT -p udp --destination-port 6881:6881 -j ACCEPT
Hit enter. This adds a rule to open UDP port 6881 in your firewall. Type:
/sbin/iptables-save > /etc/sysconfig/iptables
Hit enter. This saves the rule. Type:
/sbin/iptables -L
Hit enter. This will output your iptables file so you can see if the rule was saved. Type:
cd /home/your_user_name
Hit enter. Type:
tar xvfj *.tar.bz2
Hit enter. Type:
rm *.bz2
Hit enter. Type "y" and hit enter. Type:
cd azureus
Hit enter. Type:
./azureus
Hit enter. Azureus will open. Configure your preferences in the dialog box presented and update the plugin if asked. (If you get an error later when auto-updating you may have to log in as root (type "su -" in a terminal, hit enter, type your root password, hit enter), change to your home directory (cd /home/your_user_name), and run azureus as root temporarily to successfully update.) When you click on a ".torrent" file in Firefox you will be presented with a dialog box. Click the radio button "open with" and click the checkbox "Do this automatically for files like this form now on", then click the "browse" button in the dialog box (or the down arrow on the left side of the text window and select "other") and browse to "home" > "azureus", double click on "azureus" and select "azureus". Click "open". Click "OK". This will allow you to download ".torrent" files from within Firefox. Note: If you choose to download your files into a hidden directory such as the /home/your_user_name/.Azureus/shares folder you will have to click on "View" > "Show hidden files" in "Places" > "Home Folder" to get to them in the file browser.
Then type bash shell programming books torrents into google and you'll be in business. :)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.