Port forwarding allows remote computers, for example, computers on the Internet, to connect to a specific computer or service within a private local area network (LAN).
In Linux kernels, this is achieved by packet filter rules in the iptables or netfilter kernel components. BSD and Mac OS X operating systems implement it in the Ipfirewall (ipfw) module.
This is also useful (a little bit useful) for hiding your port from hackers.
So, lets check it ....
IP Forwarding
Policy
IP Masquerade
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Forward
/sbin/iptables -A FORWARD -i eth0 -j ACCEPT
Portforwarding from 192.168.10.1:8888 to 192.168.13.5:80
Leave a comment for more information on that topic.....
After a short practice, i'll post a Tutorial "How to use TCPDUMP in linux?"...
May be tomorrow.......
Have a fun
In Linux kernels, this is achieved by packet filter rules in the iptables or netfilter kernel components. BSD and Mac OS X operating systems implement it in the Ipfirewall (ipfw) module.
This is also useful (a little bit useful) for hiding your port from hackers.
So, lets check it ....
IP Forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
Policy
/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P OUTPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
IP Masquerade
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Forward
/sbin/iptables -A FORWARD -i eth0 -j ACCEPT
Portforwarding from 192.168.10.1:8888 to 192.168.13.5:80
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8888 -j DNAT --to 10.144.65.230:80
/sbin/iptables -A FORWARD -p tcp -i eth0 -d 10.144.65.230 --dport 80 -j ACCEPT
Leave a comment for more information on that topic.....
After a short practice, i'll post a Tutorial "How to use TCPDUMP in linux?"...
May be tomorrow.......
Have a fun
0 comments:
Post a Comment