Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[RedHat] Iptables

Hey can someone please help me via Skype, im trying to figure out how to use iptables trying to allow http from one node to another , allowing ssh and pings both way thanks.
SSH
{
iptables -A TCP -p tcp -m tcp --dport 22 -j ACCEPT
}
Enable or allow ICMP ping incoming client request
SERVER_IP="******"
{
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d $SERVER_IP -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 0 -s $SERVER_IP -d 0/0 -m state --state ESTABLISHED,RELATED -j ACCEPT
}
Allow or enable outgoing ping request
{
SERVER_IP="*******"
iptables -A OUTPUT -p icmp --icmp-type 8 -s $SERVER_IP -d 0/0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -s 0/0 -d $SERVER_IP -m state --state ESTABLISHED,RELATED -j ACCEPT
}
(Apr 13, 2016 11:33 PM)DeathBlader Wrote:  SSH
{
iptables -A TCP -p tcp -m tcp --dport 22 -j ACCEPT
}
Enable or allow ICMP ping incoming client request
SERVER_IP="******"
{
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d $SERVER_IP -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 0 -s $SERVER_IP -d 0/0 -m state --state ESTABLISHED,RELATED -j ACCEPT
}
Allow or enable outgoing ping request
{
SERVER_IP="*******"
iptables -A OUTPUT -p icmp --icmp-type 8 -s $SERVER_IP -d 0/0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -s 0/0 -d $SERVER_IP -m state --state ESTABLISHED,RELATED -j ACCEPT
}

Thanks you!!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Debian] by jasonnixJan 23, 2024 11:04 PM 4 159 Jan 23, 2024 11:04 PM
Last Post: jasonnix
by jasonnixSep 13, 2023 09:54 AM 5 286 Sep 13, 2023 09:54 AM
Last Post: jasonnix
by jasonnixAug 6, 2023 12:44 AM 3 135 Aug 6, 2023 12:44 AM
Last Post: jasonnix