View previous topic :: View next topic |
Author |
Message |
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Jun 02, 2020 3:28 pm Post subject: |
|
|
FANTASTIC! I ran the following command on the k6 "iptables -t nat -A POSTROUTING -p tcp -o wan0 -j SNAT --to 198.168.0.199"
I even think I understand it. I then went down into the basement and told the laptop's Pale Moon browser to check for updates. It checked, found one (I knew it would), downloaded it.
I was then at Pale Moon's web site at the page describing the changes. I typed forums.gentoo.org into the address bar and got the forum login page. Unfortunately I don't remember my password, a random hex number, so I had to come back upstairs to post this. But I'm positive I could have logged in. My browser remembers the password, I'll jot it down and put it in the laptop browser and save it.
At this point we are double NATed and the default POLICY is ACCEPT, but I'm relying on the DLINk's firewall to stop unwanted incoming traffic.
Is the --to clause required? I made it a shell variable so it can be changed at one place "iptables -t nat -A POSTROUTING -p tcp -o wan0 -j SNAT --to ${WAN0_ADDRESS}"
Hmmm! Can I ping 8.8.8.8? I doubt it because of the "-p tcp" I need another line with "-p icmp" don't I? Or I could maybe use "-p any"?
Last edited by Tony0945 on Tue Jun 02, 2020 3:45 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Tue Jun 02, 2020 3:33 pm Post subject: |
|
|
Tony0945
Raw IPTables ... shudder.
I'll leave that to others. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Jun 02, 2020 3:52 pm Post subject: |
|
|
NeddySeagoon wrote: | Tony0945
Raw IPTables ... shudder.
I'll leave that to others. |
On the laptop.
When NeddySeagoon shudders, angels fear to tread. Not that I'm an angel. Just ask my wife and daughter. My grandsons, that's a different story. They always come to me when they are in trouble.
Is it time to re-try shorewall now that I know rules that work? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Tue Jun 02, 2020 4:21 pm Post subject: |
|
|
Tony0945 wrote: | FANTASTIC! I ran the following command on the k6 "iptables -t nat -A POSTROUTING -p tcp -o wan0 -j SNAT --to 198.168.0.199"
I even think I understand it. |
My congratulation ! Now we make it better ...
Tony0945 wrote: | Hmmm! Can I ping 8.8.8.8? I doubt it because of the "-p tcp" I need another line with "-p icmp" don't I? Or I could maybe use "-p any"? |
Better ... just omit it; it isnt needed
Tony0945 wrote: | Is the --to clause required? I made it a shell variable so it can be changed at one place "iptables -t nat -A POSTROUTING -p tcp -o wan0 -j SNAT --to ${WAN0_ADDRESS}" |
When you are doing SNAT, THEN it is required. When using Masquerading, you must not / can not set a --to clause, because the kernel sets the ip adress automaticaly to the ip of the interface. Please try this instead your command above:
Code: | iptables -t nat -A POSTROUTING -o wan0 -j MASQUERADE |
Please check all your connections and tell me the results and then 2. tell me also what you want to filter in your Router.
In the meantime I consider whether I should write something about using user-defined chains.
But I think, it will be easy for you to understand, because you are a programmer also. I can tell you in advance: It is the same like using subroutines (or functions) in a programm. You dont write a subroutine for one or two commands. You write a subroutine only when it is worthwhile, not programming the same 10 lines again and again in your main programm. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Tue Jun 02, 2020 4:24 pm Post subject: |
|
|
Tony0945 wrote: | Is it time to re-try shorewall now that I know rules that work? |
I would suggest you to wait a little bit. I will do the firewall with you (if you want). |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Tue Jun 02, 2020 4:29 pm Post subject: |
|
|
Tony0945,
That's your call. Everyone else but me in this topic appears to support writing IPtables rules.
Does this reddit post matter? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Tue Jun 02, 2020 4:37 pm Post subject: |
|
|
Tony0945 wrote: | At this point we are double NATed and the default POLICY is ACCEPT, but I'm relying on the DLINk's firewall to stop unwanted incoming traffic. |
With your actual setup you can only secure your windows laptop.
If you want to use your K6 as FireWall for ALL your computers you have to rearrange your network =>
Code: |
four other computers
| | |
+-------------------------------------------+
------------ | --------------------------- _|_|_|_|_ ___________
| | 10.0.0.0/24| | | | | | |
| laptop |-------------+ | lan0 k6 wan0 | -| switch |-------| MSI |
| | | |<--+ |______ _| |__________|
------------ ---------------------------| | |
| | |
+-----------------------------------------+
|
+-----------+
|
Dlink router (network 192.168.0.0/24)
|
|
Cable modem
|
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Tue Jun 02, 2020 5:04 pm Post subject: |
|
|
pietinger wrote: | Please try this instead your command above:
Code: | iptables -t nat -A POSTROUTING -o wan0 -j MASQUERADE |
|
P.S.: Dont forget to delete your rule ... (iptables -F) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Tue Jun 02, 2020 6:14 pm Post subject: |
|
|
User-defined Chains
For which constellations you should use one or more user-defined chains ?
If you are a programmer, you know what is a subroutine or function. And you also know when it is worthwhile to use a subroutine. A chain is something similar to a subroutine. You use it if you want define the same rules for more than one "way" in your firewall. If you have a personal firewall (one interface), I can hardly find a reason to use a user-defined chain. At least you need two interfaces in your host. And even then it matters what you want allow or disallow for every way a data-packet could go. If you want your host acting as a passive firewall, you maybe didnt find enough rules which will be used doubled. Because you need 4 Rules (doubled 8 ) to skimp 1 line. I explain:
You need one line for creating your user-defined chain with "iptables -N MYCHAIN",
PLUS 2 lines for jumping in it,
PLUS 4 lines you want to define.
= 7 lines
If you have 2 interfaces, but allow all outgoing traffic and filtering only incoming traffic (e.g. from the internet), it is also hard to find doubled rules. And even if you filters your outgoing traffic from your LAN-side to the internet, but dont allow your router outgoing traffic, its hard to find doubled rules. So in my example we allow our workstations in our LAN AND our router some outgoing traffic: DNS, NTP, Ping, traceroute and ssh. Without a user-defined chain you would need 10 lines. With a user-defined chain we need 8 lines:
Code: | iptables -N MY
# we allow some outgoing protocols in our user-defined chain named MY
# DNS
iptables -A MY -p udp --dport 53 -j ACCEPT
# NTP
iptables -A MY -p udp --dport 123 -j ACCEPT
# pings
iptables -A MY -p icmp --icmp-type 8/0 -j ACCEPT
# traceroute
iptables -A MY -p udp --dport 33434:33524 -j ACCEPT
# ssh
iptables -A MY -p tcp --dport 22 -j ACCEPT
# now we jump from our 2 ways we want to allow (accept) in our MY chain
# first we allow our router to do DNS, NTP, Ping, traceroute and ssh
iptables -A OUTPUT -o $WAN -j MY
# then we allow all hosts in our LAN the same
iptables -A FORWARD -i $LAN -j MY |
(This example is not complete; its only for demonstration purposes)
If you ask me now, what if I want allow my hosts in my LAN a little bit MORE than my router. What I have to do then ?
The same as always: You allow it only for the way you want. (additionly/beside your chain)
Code: | # Allow all outgoing http and https without logging:
iptables -A FORWARD -i $LAN -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -i $LAN -p tcp --dport 443 -j ACCEPT |
Before or after the jump to my CHAIN ?
You CAN set these rules before OR after your jump to your chain, but you SHOULD set the rules in dependence which rule will be asked more often. For example: You have massive web-browsing, then you should allow outgoing https-traffic BEFORE you jump into your chains (in reallity the performance difference in private installations is soooo little, it rather doesnt much matters).
Must I define the rules in my user chain before I jump in it ?
YES !
What does netfilter when no rule in my chain was selected ?
Netfilter goes back, where it came from (there is an invisible "return") and matches the rules in the next lines ... and at the end it does the DEFAULT action if not even one rule matched. |
|
Back to top |
|
|
nick_gentoo Tux's lil' helper
Joined: 07 Jan 2019 Posts: 140
|
Posted: Wed Jun 03, 2020 10:31 am Post subject: |
|
|
NeddySeagoon wrote: | Tony0945,
That's your call. Everyone else but me in this topic appears to support writing IPtables rules.
Does this reddit post matter? |
Hi, I'm not sure, what do you mean? I understood that your advice is to use Shorewall (which I also like, but after only a little use).
But the reddit post says that the development is stopping, so how do you propose take this into account? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Wed Jun 03, 2020 4:25 pm Post subject: |
|
|
nick_gentoo,
Shorewall is OSS, its quite possible that other developers will take it on.
That's old news and I'm not up to date with the current status of the project.
I've been a shorewall user for almost 10 years, so I'll be reluctant to learn something new.
Someone new to Shorewall may want to look into its future before investing time in learning it.
That notice was on the Shorewall site at one time but its gone now. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Wed Jun 03, 2020 6:46 pm Post subject: |
|
|
Meh! I run a lot of old software. The quesion is can I understand it enough to do EAPI updates when they occur?
At worst, I can do a genric build with an old portage and repackage it as a binary package, IF if doesn't depend on old libraries not consistent with new libraries.
I do like the logging with shorewall. None of the suggested methods on the internet are working correctly. They were aimed at Fedora/Ubuntu/Debian. Right now the k6 is not logging to any of /var/log/messages/ or /var/log/kern.log.
It's logging to dmesg. Shorewall logged to it's own log. |
|
Back to top |
|
|
nick_gentoo Tux's lil' helper
Joined: 07 Jan 2019 Posts: 140
|
Posted: Wed Jun 03, 2020 8:49 pm Post subject: |
|
|
I guess it's not so easy to look into shorewall's future today
I had also started with an iptables-only script, like pietinger is describing, but for a single machine. I read about some iptables stuff, and yes, it made sense and it was pretty simple. But this was a script that only needed updates very rarely, maybe once every few years. And after a few years of not looking at it, it did not make so much sense anymore, and I had to go back at re-reading the iptables stuff.
And now I feel that, for a simple setup at least, the shorewall config files fit better to the little iptables stuff that is still stuck into my memory. But I can see that, if I would work with it on a daily basis, I could prefer the direct scripting approach. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Wed Jun 03, 2020 9:13 pm Post subject: |
|
|
Tony0945,
Shorewall runs once at startup to set up IPTables then exits. It doesn't do logging itself because its not running.
If you like its logging, its the way it sets up the IPTables LOG target.
You can do the same thing by hand is look at what shorewall does and copy it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Jun 05, 2020 6:01 pm Post subject: |
|
|
Made another stab at shorewall.
Right off the bat, I find a discrepancy between the wiki and the shorewall documentation regarding the interfaces in the zones file.
The wiki puts the device name in the second column like this:
Code: | net enp4s0 tcpflags,nosmurfs,routefilter,logmartians,sourceroute=0 |
The docs do this:
Code: | net NET_IF dhcp,tcpflags,nosmurfs,routefilter,logmartians,sourceroute=0,physical=eth0 |
I'm following the docs
Code: | net NET_IF dhcp,tcpflags,nosmurfs,routefilter,logmartians,sourceroute=0,physical=wan0
loc LOC_IF dhcp,tcpflags,nosmurfs,routefilter,logmartians,physical=lan0 |
However, also note that I added dhcp to the second line per the wiki, not the docs
The wiki adds this to /etc/shorewall/policy Code: | dhcp,tcpflags,nosmurfs,routefilter,logmartians |
The docs do not and I did not. If I understand correctly, that would open the firewall to internaet manipulation which would be good for external maintenance but I do all maintenance locally.
Per the docs set /etc/shorewall/snat tp: Code: | MASQUERADE 192.168.0.0/8 wan0 |
Stopped_rules: I did not understand the syntax so I left the shorewall default.
Rules: The default looked good to me. Unsure whether to change net & loc to wan0 & lan0 so I didn't
The wiki refers to file /etc/shorewall/masq but that file doesn't exist in 5.2.4.4
I made both the shorewall.conf wiki changes since my ISP does not support IPv6 |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Jun 05, 2020 6:21 pm Post subject: |
|
|
Started shorewall "service shorewall start". Didn't get kicked out of ssh. That's good.
Went down to the laptop. Couldn't ping anything. That's bad. Examined the laptop. It's an HP 1444.
It actually has a built-in CD drive unlike my sister's netbook. I scared up the first sysrescuecd I could find v 3.0.0.1
I know I have much later versions but that's what's was in the basement. It booted handily and net-setup eth0 (No persistent garbage in the old version). Ifconfig shows ip address 10.0.0.110 All good. But didn't get any farther with ping. Much encouraged that we can proceed with Gentoo Linux on all cable connections now.
Seeing this in dmesg on the k6 (lots and lots of lines)
Code: | [ 35.990579] e1000: lan0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[ 35.997515] 8139too 0000:00:08.0 wan0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[ 36.649294] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
[238775.290288] xt_CT: No such helper "ftp"
[238775.331839] xt_CT: No such helper "ftp-0"
[238775.382619] xt_CT: No such helper "amanda"
[238775.567703] xt_CT: No such helper "snmp"
[238775.610281] xt_CT: No such helper "RAS"
[238804.983627] loc-fw REJECT IN=lan0 OUT= MAC=90:e2:ba:ed:ef:4c:78:ac:c0:55:9e:f2:08:00 SRC=10.0.0.110 DST=10.0.0.1 LEN=64 TOS=0x00 PREC=0x00 TTL=128 ID=30364 PROTO=UDP SPT=54402 DPT=53 LEN=44
[238804.985938] loc-fw REJECT IN=lan0 OUT= MAC=90:e2:ba:ed:ef:4c:78:ac:c0:55:9e:f2:08:00 SRC=10.0.0.110 DST=10.0.0.1 LEN=65 TOS=0x00 PREC=0x00 TTL=128 ID=30365 PROTO=UDP SPT=56181 DPT=53 LEN=45
[239064.933911] loc-fw REJECT IN=lan0 OUT= MAC=90:e2:ba:ed:ef:4c:78:ac:c0:55:9e:f2:08:00 SRC=10.0.0.110 DST=10.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=128 ID=30404 PROTO=UDP SPT=56159 DPT=53 LEN=47
[239064.942083] loc-fw REJECT IN=lan0 OUT= MAC=90:e2:ba:ed:ef:4c:78:ac:c0:55:9e:f2:08:00 SRC=10.0.0.110 DST=10.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=128 ID=30405 PROTO=UDP SPT=60114 DPT=53 LEN=47
[239079.952730] loc-fw REJECT IN=lan0 OUT= MAC=90:e2:ba:ed:ef:4c:78:ac:c0:55:9e:f2:08:00 SRC=10.0.0.110 DST=10.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=128 ID=30413 PROTO=UDP SPT=53243 DPT=53 LEN=47
|
Before shutting down shorewall with "service shorewall stop" I ran iptables -L with this result http://dpaste.com/18CX6RM
And /var/log/shorewall-init.log http://dpaste.com/2KPVDYT |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Fri Jun 05, 2020 6:36 pm Post subject: |
|
|
Tony0945 wrote: | Code: | [...]tcpflags,nosmurfs,routefilter,logmartians,[...] |
|
I dont know how Shorewall works, but I would like to see what it produces with this flags ...
... logmartians ... haha ... when it is what I think, then I wold like to ask, who needs this (and who want this), because I dont know anybody sitting before the log and saying: "hey, we have a martian here, great !" ...
Code: | MASQUERADE 192.168.0.0/8 wan0 | [/quote]
I dont know why you try doing supernetting here, but it is wrong, because you could only use 16 bit. I would try /24 instead of /8
Please show me the rules Shorewall made. I am very interested. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54808 Location: 56N 3W
|
Posted: Fri Jun 05, 2020 6:45 pm Post subject: |
|
|
Tony0945,
It looks like you have 3 zones net, loc and fw.
The REJECTed packets are DNS requests (DPT=53).
Why are they in the loc-fw chain?
Code: | Jun 5 11:38:17 Compiling /etc/shorewall/policy...
Jun 5 11:38:17 Policy for loc to net is ACCEPT using chain loc-net
Jun 5 11:38:17 Policy for net to fw is DROP using chain net-all
Jun 5 11:38:17 Policy for net to loc is DROP using chain net-all
Jun 5 11:38:17 Policy for fw to net is REJECT using chain all-all
Jun 5 11:38:17 Policy for fw to loc is REJECT using chain all-all
Jun 5 11:38:17 Policy for net to fw is REJECT using chain all-all
Jun 5 11:38:17 Policy for net to loc is REJECT using chain all-all
Jun 5 11:38:17 Policy for loc to fw is REJECT using chain all-all
Jun 5 11:38:17 Policy for loc to net is REJECT using chain all-all |
Hmm loc to net appears twice there. I would expect DNS requests to be in the loc to net chain. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Jun 05, 2020 6:53 pm Post subject: |
|
|
pietinger wrote: | I would try /24 instead of /8 |
Argggh! That's what I meant to do. When my little grandson was in elementary school and screwed up bad, he would hang his little head and say "I don't know where my mind went."
pietinger wrote: | Please show me the rules Shorewall made. I am very interested. | http://dpaste.com/18CX6RM |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Jun 05, 2020 7:01 pm Post subject: |
|
|
NeddySeagoon wrote: | It looks like you have 3 zones net, loc and fw. |
Should I move fw to loc per shorewall's webpage?
NeddySeagoon wrote: | The REJECTed packets are DNS requests (DPT=53).
Why are they in the loc-fw chain? | I tried "ping www.gentoo.org" from the laptop.
I burned v 5.3.2 of sysrescuecd. Will do future work booting on this, saving Windows for last.
That laptop has a 320G 5400RPM Toshiba drive, really tempted to put that Crucial MX500 SSD in there. (wait wait Tony, one thing at a time) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Fri Jun 05, 2020 7:24 pm Post subject: |
|
|
Tony0945 wrote: | http://dpaste.com/18CX6RM |
The rule "ctstate RELATED,ESTABLISHED" should be the first rule, because 99 % (or even more) of all traffic matches this rule.
Shorewall let the kernel proof 16 rules before this ... hard work ... poor kernel ...
Ok. It is because you set:
1. "smurf" ... this is TODAY not a thema, because no router forwards a broadcast-ping and the standard configuration of a host is also not to answer to a broadcast-ping.
2. "tcpflags" ... nobody needs this.
3. "logmartians" ... nobody needs this.
Last edited by pietinger on Fri Jun 05, 2020 11:08 pm; edited 1 time in total |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5364 Location: Bavaria
|
Posted: Fri Jun 05, 2020 8:17 pm Post subject: |
|
|
I have zeroed iptables before 2 days. Look to my output-chain and the numbers of packets:
- 1.117.000 in my 2nd rule: "ctstate RELATED,ESTABLISHED" (the first is allowing loopback")
- 9.000 packets alltogether the rest
Code: | Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
2225K 3003M ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
1117K 122M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
4193 252K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 owner UID match 104
296 17760 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 owner UID match 104
4861 338K ACCEPT udp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx udp dpt:53
0 0 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:53
1 63 ACCEPT udp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx udp dpt:53
0 0 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:53
25 1500 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:995
27 1620 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:995
52 3120 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:995
51 3060 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx tcp dpt:995
0 0 ACCEPT tcp -- * * 0.0.0.0/0 xxxxxxxxxxxxxxx tcp dpt:587
2 152 ACCEPT udp -- * * 0.0.0.0/0 xxxxxxxxxxxxxx udp dpt:123
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8 code 0
0 0 ACCEPT all -- * * 0.0.0.0/0 xxxxxxxxxxxxxx
2 120 LOG all -- * * 0.0.0.0/0 xxxxxxxxxxxxxx LOG flags 0 level 4 prefix "ACCEPT OUT spDYN "
2 120 ACCEPT all -- * * 0.0.0.0/0 xxxxxxxxxxxxxx
0 0 LOG all -- * * 0.0.0.0/0 xxxxxxxxxxxxxx LOG flags 0 level 4 prefix "ACCEPT OUT XMPP "
0 0 ACCEPT all -- * * 0.0.0.0/0 xxxxxxxxxxxxxx
0 0 LOG all -- * * 0.0.0.0/0 77.86.229.90 LOG flags 0 level 4 prefix "ACCEPT OUT download QTWebKit "
0 0 ACCEPT all -- * * 0.0.0.0/0 77.86.229.90
0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 LOG flags 0 level 4 prefix "ACCEPT OUT SSH "
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:11371 LOG flags 0 level 4 prefix "ACCEPT OUT HKP "
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:11371
0 0 LOG udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:33434:33524 LOG flags 0 level 4 prefix "ACCEPT OUT TRCR "
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:33434:33524
2 120 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:873 LOG flags 0 level 4 prefix "ACCEPT OUT RSYNC "
2 120 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:873
6 240 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 4 prefix "REJECT !!! "
6 240 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable |
This should show, how important the sequence of rules is. And yes I could optimize it a little bit more by changing the order of http (80) and DNS (53), but this is so 0,0000000001% ... I am too lazy |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Jun 12, 2020 10:35 pm Post subject: |
|
|
Putting this on hold as the latest python nonsense is taking all my time. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|