LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-21-2024, 01:00 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 561

Rep: Reputation: 10
Post Can I drop :INPUT and :FORWARD?


Hello,
In Linux, I have installed Tor and am using it as a remote proxy, and at the same time I have tunneled OpenVPN on Tor. My iptables rules are as follows:
Code:
# Generated by iptables-save v1.8.9 (nf_tables) on Sun Jan 21 10:16:31 2024
*filter
:INPUT ACCEPT [862:113997]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [76190:79547849]
-A INPUT -p udp -m udp --dport 2024 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9050 -j ACCEPT
-A INPUT -s 172.21.50.0/24 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -m limit --limit 2/sec -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
-A INPUT -p icmp -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -m state --state INVALID -j DROP
-A INPUT -s 10.10.0.0/24 -i tun2 -m state --state NEW -j ACCEPT
-A FORWARD -i enX1 -o tun2 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 10.10.0.0/24 -o enX1 -j ACCEPT
COMMIT
# Completed on Sun Jan 21 10:16:31 2024
# Generated by iptables-save v1.8.9 (nf_tables) on Sun Jan 21 10:16:31 2024
*nat
:PREROUTING ACCEPT [5964:400656]
:INPUT ACCEPT [4042:236895]
:OUTPUT ACCEPT [7:1508]
:POSTROUTING ACCEPT [7:1508]
-A PREROUTING -s 10.10.0.0/24 -i tun2 -p udp -m udp --dport 53 -j DNAT --to-destination 10.10.0.1:53530
-A PREROUTING -s 10.10.0.0/24 -i tun2 -p tcp -j DNAT --to-destination 10.10.0.1:9040
-A PREROUTING -s 10.10.0.0/24 -i tun2 -p udp -j DNAT --to-destination 10.10.0.1:9040
-A POSTROUTING -s 10.10.0.0/24 -o enX1 -j MASQUERADE
COMMIT
# Completed on Sun Jan 21 10:16:31 2024
Can I drop the :INPUT and :FORWARD policies?

Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it necessary to drop specific flags in IPTABLES with an INPUT DROP policy? rootaccess Linux - Networking 5 08-22-2012 08:10 PM
How can I forward ports with IPtables? I want to forward 80 to 8080 abefroman Linux - Networking 3 05-23-2008 10:05 AM
Repeated "input: AT Translated Set 2 keyboard as /class/input/input" messages AcerKev Mandriva 2 09-16-2007 08:35 AM
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 08:21 AM
iptables - drop all -> allow needed OR allow all -> drop specific lucastic Linux - Security 5 12-21-2004 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration