-
-
Save aesthetic-zz/ac204863852442131aca to your computer and use it in GitHub Desktop.
iptable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:~$ sudo iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 21 -j REDIRECT --to-ports 10021 | |
iptables: No chain/target/match by that name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:~$ sudo iptables -t filter -L | |
Chain INPUT (policy ACCEPT) | |
target prot opt source destination | |
ACCEPT udp -- anywhere anywhere udp dpt:domain | |
ACCEPT tcp -- anywhere anywhere tcp dpt:domain | |
ACCEPT udp -- anywhere anywhere udp dpt:bootps | |
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps | |
ACCEPT tcp -- anywhere anywhere tcp spt:5555 dpt:5555 | |
Chain FORWARD (policy ACCEPT) | |
target prot opt source destination | |
ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED | |
ACCEPT all -- 192.168.122.0/24 anywhere | |
ACCEPT all -- anywhere anywhere | |
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable | |
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment