BroadbanterBanter

BroadbanterBanter (http://www.broadbandbanter.co.uk/forum.php)
-   uk.comp.home-networking (UK home networking) (http://www.broadbandbanter.co.uk/uk-comp-home-networking-uk-home/)
-   -   Linux IP routing: help (http://www.broadbandbanter.co.uk/43943-linux-ip-routing-help.html)

[email protected] May 13th 15 01:20 AM

Linux IP routing: help
 
Hi!
I have two access to internet..

I have a LAN 192.168.0.0/24 but, the IP 192.168.0.2 only I need to out for the other conection.

Example:

192.168.0.0/24 - ppp0
192.168.0.2/32 - ppp1


How to make the changes? I don't understand all the options of IP..
Thanks in advance!

Henry Law May 13th 15 07:18 AM

Linux IP routing: help
 
On 13/05/15 01:20, wrote:
I have two access to internet..

I have a LAN 192.168.0.0/24 but, the IP 192.168.0.2 only I need to out for the other conection.


Not sure I understand your question. Your internet connection will not
have an address in 192.168... because that is one of the RFC1819
"private internet" blocks.


Example:

192.168.0.0/24 - ppp0
192.168.0.2/32 - ppp1


But these are not two different, independent networks. If you go to
http://mxtoolbox.com/subnetcalculator.aspx and play around a bit you
will see that 192.168.0.2 is a valid address in both of them.

--

Henry Law Manchester, England

Josť Sanabria May 13th 15 02:24 PM

Linux IP routing: help
 
Hi Henry!

Well, I have a one LAN 192.168.0.0/24

And have two conection to Internet (ppp0 and ppp1)

All PCs get out to Internet over the conexion of ppp0

But, I need only one PC of the LAN 192.168.0.0/24 to get out over the ppp1

The PC have a fix IP 192.168.0.2/32

I can make the changes with IP command?
I test the iptables, without result.

I make the changes with the IP command:

# echo 202 voip /etc/iproute2/rt_tables
# ip rule add from 192.168.0.2/32 table fibra
# ip route add default dev ppp1 table fibra
# ip route flush cache

The IP 192.168.0.2/32 get out to the Internet over ppp1

But, connecting other PC with OPENVPN to access lan remotely, I can't ping or see the 192.168.0.2/32, but I can see all other IP. Only the 192.168.0.2/32 I can't access.

Only within the LAN I can ping..

You understand me?

muzyk93 May 21st 15 05:00 PM

It works :)
plastic supplier


All times are GMT +1. The time now is 01:45 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 2.4.0
Copyright © 2004-6 BroadbandBanter.co.uk