Networking Forums

Networking Forums > Computer Networking > Linux Networking > linux: router: -problem

Reply
Thread Tools Display Modes

linux: router: -problem

 
 
Adamo
Guest
Posts: n/a

 
      02-27-2006, 12:58 PM
Hi,
I have a few public ip and I want to use linux as a router, on router
will be also firewall, trafic shaper.

I have:
$WAN: eth0
$LAN: eth1
Interfaces
# WAN
$IP addr add 192.168.0.70/24 brd 192.168.0.255 dev $WAN scope global
label $WAN
# LAN
$IP addr add 192.168.0.70/26 brd 192.168.0.127 dev $LAN scope global
label $LAN
$IP link set $WAN up
$IP link set $LAN up
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
echo 1 > /proc/sys/net/ipv4/ip_forward
Routing:
IP route add 0/0 via 192.168.0.254 dev $WAN

Of course all ip are public. On the local interface I did subnetting.
The problem is that from clinet for example 192.168.0.72 I can go out
but I can't in, He can't connect with the internet.
'ip route' command looks:
192.168.0.254 dev eth0 scope link
192.168.0.64/26 dev eth1 proto kernel scope link src 192.168.0.70
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.70
169.254.0.0/16 dev lo scope link
default via 192.168.0.254 dev eth0

Greetings
 
Reply With Quote
 
 
 
 
darjus@gmail.com
Guest
Posts: n/a

 
      02-28-2006, 07:09 AM
Hi,
Can't understand what you really want to do
Can't you just use for WAN 192.168.0.70/24 (by the way this can't be a
public IP) and for LAN 192.168.1.70/24, then setup NAT (iptables -t nat
-A POSTROUTING -o eth0 -j MASQUERADE)?

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PPTE and Linux router problem Marcin Giedz Linux Networking 0 01-06-2005 04:02 PM
Problem with PRIO qdisc on Linux router Tim G Linux Networking 2 12-16-2004 06:11 PM
Linux DSL router box/firewall problem Stan Dowd Linux Networking 2 04-21-2004 06:09 PM
Linux as router problem Robert Linux Networking 0 02-11-2004 06:49 PM
Linux Router/Firewall - Linux Client problem Fry Linux Networking 6 09-06-2003 02:25 AM



1 2 3 4 5 6 7 8 9 10 11