Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2705  / 3 Years ago, sat, august 28, 2021, 11:24:17

I need to connect to my computer remotely(all ports), but that ip changes. I have everthing figured out on how the comp woukd know my current ip, but i don't know how to add an ip on all ports and remove that ip (dynamic ip so I'll remove one and add a new one). Don't i need to save the changes during commands?



For the people answering, i already have a no-ip account, and the computer checks that to see when it changes. All i have to do now is add the new ip and remove the old one. Also i have my router allow only the ports i need.Thanks for trying though.


More From » iptables

 Answers
3
sudo iptables -I INPUT -i eth1 -s $currip -j ACCEPT


Adds an IP



sudo iptables -D INPUT -i eth1 -s $lastip -j ACCEPT


Removes an IP



Tested



Thanks to those who tried. I hope this helps someone.


[#32208] Sunday, August 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allowiel

Total Points: 189
Total Questions: 103
Total Answers: 105

Location: Slovenia
Member since Thu, Mar 18, 2021
3 Years ago
;