Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by mokkan
at 2024-08-09 06:31:45
Point:500 Replies:4 POST_ID:828729USER_ID:11612
Topic:
Linux;;Unix Operating Systems
When I look at iptables, i can see lots of rules as default, but when I do iptables -L, it shows only the following line only. Am I missing some thing?
DROP tcp -- 192.168.112.25 anywhere tcp dpt:ssh
[root@server3 init.d]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*nat
:PREROUTING ACCEPT [134:10773]
:POSTROUTING ACCEPT [333:35516]
:OUTPUT ACCEPT [350:37659]
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*mangle
:PREROUTING ACCEPT [57821:26615023]
:INPUT ACCEPT [57814:26614317]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [50045:72013933]
:POSTROUTING ACCEPT [50501:72086655]
-A POSTROUTING -o virbr0 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*filter
:INPUT ACCEPT [89:7135]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [75:7234]
-A INPUT -s 192.168.112.25/32 -p tcp -m tcp --dport 22 -j DROP
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
[root@server3 init.d]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- 192.168.112.25 anywhere tcp dpt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- 192.168.112.25 anywhere tcp dpt:ssh
[root@server3 init.d]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*nat
:PREROUTING ACCEPT [134:10773]
:POSTROUTING ACCEPT [333:35516]
:OUTPUT ACCEPT [350:37659]
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*mangle
:PREROUTING ACCEPT [57821:26615023]
:INPUT ACCEPT [57814:26614317]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [50045:72013933]
:POSTROUTING ACCEPT [50501:72086655]
-A POSTROUTING -o virbr0 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 00:11:30 2013
*filter
:INPUT ACCEPT [89:7135]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [75:7234]
-A INPUT -s 192.168.112.25/32 -p tcp -m tcp --dport 22 -j DROP
COMMIT
# Completed on Sun Aug 4 00:11:30 2013
[root@server3 init.d]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- 192.168.112.25 anywhere tcp dpt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Author: mokkan replied at 2024-08-09 07:43:43
I found the reason. When I do iptables -L , it only shoes the filter type. I need to check other types to see all the values in iptables such as mangel, raw and nat.
Thank you for your help.
Thank you for your help.
Expert: duncanb7 replied at 2024-08-09 07:27:08
I think you need to re-installip talbes if you could not see it, please see the second link
Author: mokkan replied at 2024-08-09 07:16:45
thank you for your reply. My question is that why it is not showing up when I do iptables -L ?
Accepted Solution
Expert: duncanb7 replied at 2024-08-09 06:37:20
500 points GOOD