My router has UPnP, as do its work with ubuntu to automatically open ports

My router has UPnP,how to make it work with ubuntu to automatically open ports

I try to open the following command " /sbin/iptables -I INPUT -d 0/0 -s 0/0 -p tcp --dport 21 -j ACCEPT" ,local only opens ,if i put the ip 192.168.1.68, it works correctly, if i`m put my external ip does not work,I have to go in the router every time and opens ports.
My question is, how to make ubuntu automatically open ports

My router is thomson tg585v7

Moderator comments were removed during original forum migration.
1 Like

Anyone?:smiley:

No one Knows?
So bad:(
I'm disappointed:P

Administrator
Delete my post please!

It doesn't have to do with not know or maybe it does. A question I have is why would you want to setup your connection this way? If you are going to allow a device to open ports as needed then why do you need a firewall?

I would suggest you setup a firewall to allow the ports you need to pass and forget about random ports opening.

As to your firewall rule above, if you are going to allow any IP Address then the rule should look like this:

/sbin/iptables -I INPUT -p tcp --dport 21 -j ACCEPT

I would highly suggest that you start using STATEFUL packet filtering. You can take a look at the following Tutorial for information.

is not working !!! ,I tried ... ubuntu local open ports just do not pass and through my router .. understand?

---------- Post updated at 03:55 PM ---------- Previous update was at 03:50 PM ----------

you know the utorrent from windows? is opening automatic ports ...upnp ,but ubuntu is not using the upnp ,is not working UPnP :slight_smile:
i have the router and 3 pc in my home ,one from 3 is the server ,my server has the 192.168.1.68 ip and mine i have 192.168.64 ,i have to opent the ports from router for the ip 192.168.1.68 to work out on internet ,if i`m not opening these port from router is not working from out ,thx

---------- Post updated at 03:56 PM ---------- Previous update was at 03:55 PM ----------

sorry for my bad eng.

What type of router are you using?

THOMSON TG585v7

Don't know this router. Their site is a joke as every PDF link I click on takes me to their Business partners page.

Is there a firewall on the ubuntu box?