Gentoo box & computers from my lan can't access the internet. Connecting Gentoo box is the problem. I think that this iptables rules should share the connection throught lan after the connection is established:

on iptables rules -o must be interface connected to router. but those packets dont have anything to do with this connection.
are you sure that connection between you and router is vpn? if its do so you should emerge openvpn and configure it ;]_________________Security is like Ogres and Onions, they have layers.
Linux - Registered user #415939adopt an unanswered post

I don't have a router, I have rtl8180 based wireless PCI card (named wlan0 in ifconfig). VPN connection between me and ISP is up and running (ppp0 in ifconfig). The only thing that remains to be done is that to change the gateway so all internet traffic goes throught VPN tunnel.

In other topic (here) two members told me to use pptp and in other forum one member told me to use openvpn, so I decided to take pptp.

In my case, I don't have router and lan card to connect it, first line should be:
#/sbin/ip route add [ip_of_dns_server] dev wlan0 src [ip_of_your_lan_card] <<< the ip of my wlan0 card is dynamic... how to make a script for it later (if this will be proved to be true)
second line should be ok...

routing table changes, but I still can't access the internet & connection breakes after ~30 sec (most probably it can't reach vpn1.centurion.co.yu because default gateway was changed & it can't use the new one)

If you can than you should check that your VPN server is in the subnet which is accessible without default route. Just do `host vpn1.centurion.co.yo` to determine IP address of vpn1.centurion.co.yo and look at your `route -n`. If IP address is not among explicit routes then your guess

Quote:

connection breakes after ~30 sec (most probably it can't reach vpn1.centurion.co.yu because default gateway was changed & it can't use the new one)

may be right. Then you should add route to that server. Use default route you received from dhcp as a next hope router for this route:

Code:

route add vpn1.centurion.co.yo gw 172.16.0.1

and only now you should

Code:

ip route replace default dev 'ppp0'

If nothing works try from the very begining and drop you local LAN from consideration while you do not have internet access from your gentoo box.

Don't know why, only google works, I can search anything I wish on google. But when I want to open any other page Opera stucks at "Sending request to www.benchmark.co.yu" (as example), Firefox stucks at "Waiting for www.benchmark.co.yu"... tried about 10 most frequently accessed sites and noone worked (except google). Jabber couldn't connect too.

You can ping but firefox freeze? I think that's MTU problem. You should supply mtu and mru options to pppd. Something like

Code:

mtu 1440
mru 1440

Or may be lower. I've heard a lot of about this problem but never experienced it by myself. May be you'll manage to debug problem with `ping www.gentoo.org -s 1500`. May be that does not work, then you should lower `-s value` while it works and supply that ( value - 60 ) to mtu... I'm not sure about minus 60, but IIRC it's the size of ppp header and it should be subtracted.

ip-up is a script file... you should be able to add those two lines to the end of the file and they will run each time ppp connects. Or I suppose a more elegant way to do it would be to create an ip-up.local script (set to executable) that is called from the default ip-up script.

My ISP switched from VPN to PPPoE. Internet connection works perfectly on Gentoo box, but with my local windows station experience problems with opening pages: ping works, opening google works, playing CS works, but everything else fails... like here: https://forums.gentoo.org/viewtopic-p-3548043.html#3548043 < Waiting for {site}... stuff (just to mention one more time: on host machine (gentoo) everything works, the problem is only at other workstation on my lan)
LAN interfaces are ok, copy/paste files over samba works at >4MB/s