My Linux Guide
  • Home
Subscribe
Tagged

IPtables

A collection of 3 posts

IPtables

Port Forwarding with Iptables

You can use port forwarding in iptables, to forward a port to private ip , here is how you can do that : iptables -t nat -I PREROUTING -p tcp -d <listenip> --dport 22 -j DNAT --to <ipToForwardTo>:22 iptables -I FORWARD -p tcp -d <ipToForwardTo>

  • Nishant
Nishant Nov 17, 2012 • 1 min read
IPtables

Delete Rules in Iptables

iptables -D (Chain Name) ( RuleNum) eg. iptables -D FORWARD 1 You can delete all rules from filter chain by typing : iptables -F or from nat table iptables -F -t nat

  • Nishant
Nishant Apr 17, 2011 • 1 min read
IPtables

Redirecting Ports in Iptables

Redirect ports in iptables iptables -t nat -A PREROUTING -i eth0 -p tcp –dport $srcPortNumber -j REDIRECT –to-port $dstPortNumbe

  • Nishant
Nishant May 4, 2010 • 1 min read
My Linux Guide © 2021
Powered by Ghost