LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Open ports (https://www.linuxquestions.org/questions/slackware-14/open-ports-157979/)

dareino 03-15-2004 11:02 AM

Open ports
 
Hello....I am new to Slackware and could use some help...I currently have Slackware connected directly to "net.. All works fine..I also have an XP box behind that is running and accessing the "net fine too....I am having a problem trying to open a port for Bit Torrent that runs on the XP box. I am running NAT. Bit Torrrent runs ok but I get the Yellow Sad face indicating a NAT problem. So I need to open a port on the Linux side ,right?
I tried this command from another post but it does not work...
iptables -A OUTPUT -j ACCEPT -p udp --dport 6881 -i ethX...

root@server:/etc/rc.d# iptables -A OUTPUT -j ACCEPT -p udp --dport 6881 -i eth0
iptables v1.2.8: Can't use -i with OUTPUT

Try `iptables -h' or 'iptables --help' for more information.
root@server:/etc/rc.d#


I actually think I need to open the TCP port instead but get errors. Also where do I run this command? Hope this is enough info,,,,
thxs all
dareino

Tinkster 03-15-2004 12:16 PM

I haven't used bit torrent, but you'll likely have to
also open the incoming port, and the forwarding
with ESTABLISHED ...


Cheers,
Tink

moonloader 03-15-2004 03:56 PM

you don't have to open any port for that action,because bittorrent will open the port 6881.6882 etc.
while it is running.

dareino 03-15-2004 10:58 PM

Moonloader- then why does my d/l stink and why does Azureus report that I have a NAT problem. Before I installed Linux as my gateway, Azures kicked butt, now its alot slower....so theres nothing I can do?
thxs
dareino

dareino 03-15-2004 11:29 PM

ok, I found some useful info on another site...I ran this comand and VOLA, the NAT prob went away.
iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT --to-destination <host>
So where do I add this , the rc.firewall script or since I ran it I dont need to add it to a script?
dareino:) :) :)

Kristijan 03-16-2004 01:47 AM

Yes, just put it into a file that is executed on boot. rc.local or throw it in with the rest of your iptable rules.

questone 03-16-2004 08:37 AM

Good info here. A get the concept but I am "lost intranslation"

Quote:

ok, I found some useful info on another site...I ran this comand and VOLA, the NAT prob went away.
iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT --to-destination <host>
dareino
I execute that as such:
[steve@localhost steve]$ su
Password:
[root@localhost steve]# iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT --to-destination <host>
bash: syntax error near unexpected token `newline'
[root@localhost steve]

And this is what I get. obviously im entering somthing wron but I don't know what.

2nd: If I get this to work how do I...

Quote:

Yes, just put it into a file that is executed on boot. rc.local or throw it in with the rest of your iptable rules.
I understand why I need to do that but I don't know how. I've on been using linux for a few days so details are helpful. Thanks
:newbie:

dareino 03-16-2004 11:53 AM

I actually ran it this way: iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT --to- 192.168.0.2
hope this helps :)
dareino

questone 03-16-2004 01:53 PM

Thanks,
Azureus has given me the green light so to speak and so I am going to leave well enough alone at this point .

questone


All times are GMT -5. The time now is 02:08 AM.