Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use Tor by setting a SOCKS5 type proxy in the browser. I use these iptables rules:
Code:
-A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -p tcp --dport 9050 -m state --state NEW -j ACCEPT
If I set a public IP address on the NIC, can anyone connect to port 9050 from the Internet? As you can see, I have given internal IP address to Tor in Tor configuration.
Hello,
Thank you so much for your reply.
My internal network is connected to the Internet through a modem:
Ok, so it's still unclear.
Are you telling us you have a modem connected to a computer on your internal network with that computer configured to act as a router, or do you (as is more common these days) connect your internal network to your ISP provided device which is acting as router / "modem"?
Regardless, you should be able to configure whichever part is your router to allow incoming traffic from the WAN side on a specific port to a specific IP/Port on your LAN side, in which case your TOR server should be publicly accessible. Assuming your ISP doesn't block traffic on that port further upstream.
Are you telling us you have a modem connected to a computer on your internal network with that computer configured to act as a router, or do you (as is more common these days) connect your internal network to your ISP provided device which is acting as router / "modem"?
Regardless, you should be able to configure whichever part is your router to allow incoming traffic from the WAN side on a specific port to a specific IP/Port on your LAN side, in which case your TOR server should be publicly accessible. Assuming your ISP doesn't block traffic on that port further upstream.
Hello,
Thanks again.
My modem acts like a router and Debian server connected to the Internet directly.
Hello,
Thank you so much for your reply.
Assuming the Tor proxy is running on the address 192.168.1.2, are the following policies and rules sufficient?
Code:
*filter
:INPUT DROP [862:113997]
:FORWARD DROP [0:0]
:OUTPUT DROP [76190:79547849]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A INPUT -p tcp -s 192.168.1.0/24 --dst 192.168.1.2 --dport 9050 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9050 -j DROP
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.