Allowing port of ranges from specific ip in ufw?
by peter7089 from LinuxQuestions.org on (#5RW2W)
I want to allow connections in both directions in ufw - in and out, from specific ip address and from specific port range. Basically, i want to allow only connections from my android phone to my pc and specify the port range. This is what i tried:
Code:sudo ufw allow from 198.168.100.13 to any port 10:10000 proto tcp
sudo ufw allow from 198.168.100.13 to any port 10:10000 proto udpAnd this is the ufw status:
Code:$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
To Action From
-- ------ ----
10:10000/tcp ALLOW IN 198.168.100.13
10:10000/udp ALLOW IN 198.168.100.13But it shows only ALLOW IN connections, and i want to set also ALLOW OUT connections. And currently i am not able to connect to my pc from my phone neither over ssh or with KDE Connect.
Code:sudo ufw allow from 198.168.100.13 to any port 10:10000 proto tcp
sudo ufw allow from 198.168.100.13 to any port 10:10000 proto udpAnd this is the ufw status:
Code:$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
To Action From
-- ------ ----
10:10000/tcp ALLOW IN 198.168.100.13
10:10000/udp ALLOW IN 198.168.100.13But it shows only ALLOW IN connections, and i want to set also ALLOW OUT connections. And currently i am not able to connect to my pc from my phone neither over ssh or with KDE Connect.