Problem with sharing internet

Swapnil Jain swapnil at pisces.net.in
Sun Jan 3 16:10:00 UTC 2010


you are not masquerading, use something like this, it will work

iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -o eth0 -j MASQUERADE

where eth0 is external interface

Regards,

Swapnil Jain
Indore, India
------------------------------------------------------------
E-mail: swapnil at pisces.net.in
GTalk : swapnil at pisces.net.in
MSN: jswapnil at hotmail.com
Skype : sj1410
YIM   : sj1410
------------------------------------------------------------

On 03-Jan-2010, at 12:40 AM, dehqan65 wrote:

> In The Name Of God The compassionate merciful
> 
> hello;
> 
>                 iptables -t nat -A POSTROUTING -d \! 192.168.3.0/24 -j SNAT --to-source 10.0.151.13  
>  Above command has been used to share ppp0 internet from 192.168.3.1 to 192.168.3.2 but while pinging an address (4.2.2.2) on 192.168.3.2 it gives errors like:
> From 192.168.3.2 icmp_seq=59 Destination Host Unreachable
> 
>  192.168.3.1 and 192.168.3.2 ping each other .
> also echo 1 > /proc/sys/net/ipv4/ip_forward is done , and getway for 192.168.3.2 is 192.168.3.1
>  (of course 192.168.3.1 is FR)
> 
> Regards dehqan
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100103/2b9df32f/attachment.html>


More information about the ubuntu-users mailing list