Linux in General > Linux Tutorials & How To's

Internet Sharing in Linux / NAT How to

<< < (4/9) > >>

Ricky:
Yes..
by this method ie NAT you can do all you want !

tomamodi:
[
First make a file named 'rc.nat' and put the following script in it.

--- Code: ---

iptables=/sbin/iptables


iptables --flush -t nat


1)iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
2)iptables --append FORWARD --in-interface eth0 -j ACCEPT
3)echo 1 > /proc/sys/net/ipv4/ip_forward

--- End code ---


dear ricky
is this neccessery to put the above lines in same or  (2-3)in one line

Ricky:
line one is for for telling that which interface to be althered ie for actuall net connection for the that is ppp0 ... line to is to  accept connection for eth0 ie lan and line three is to enable packet routing..

so all are required !

ziajee:
hi
i also wanted for transparent proxy...
and it helps me out and solved my problam....

pls can you help me again for blocking msn messenger and yahoo messenger ..
and many porn sites..with this iptables...

thankx again...

Rgds

Aasim Zia

Ricky:
Well, if you look few last post of this forum then you will find the solution for your problem. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version