HELP me please. UNIX Routing


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users HELP me please. UNIX Routing
# 8  
Old 05-16-2009
Ok, in sysctl.conf, you need to set net.ipv4.ip_forward to 1 (also on the command line).

On PC1, you set the default gateway to 81.180.75.70. On PC2 you set the default gatway to 192.168.1.1. That should be it.
# 9  
Old 05-16-2009
Quote:
Originally Posted by otheus
Ok, in sysctl.conf, you need to set net.ipv4.ip_forward to 1 (also on the command line).

On PC1, you set the default gateway to 81.180.75.70. On PC2 you set the default gatway to 192.168.1.1. That should be it.
thx,
so,
for the config:

server: 1 Card: IP 81.180.75.70
mask 255.255.255.192
2 Card: IP 192.168.1.1
mask 255.255.255.0

1 PC : IP: 81.180.75.73
mask: 255.255.255.192

2 PC : IP: 192.168.1.5
mask 255.255.255.0

the rules are:
1. On server - in sysctl.conf set the net.ipv4.ip_forward to 1
2. On PC1, set the default gateway to 81.180.75.70
On PC2 set the default gateway to 192.168.1.1
3. And on server does I use the comands :
- route add 192.168.1.5 gw 81.180.75.73
- route add 81.180.75.73 gw 192.168.1.5
??

thank you
# 10  
Old 05-17-2009
ip_forward

You need to make sure ip_forward is set

sysctl -w net.ipv4.ip_forward=1

Of course, you need to be root.
# 11  
Old 05-17-2009
or

Code:
 echo 1 > /proc/sys/net/ipv4/ip_forward

# 12  
Old 05-17-2009
use this as root "only for check";

Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

If the net card name of the is: "eth0" !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX Routing Tables

I'm trying to learn the basic in's and out's of networking on my own through the use of a book. When it comes to routing tables I'm completely lost. I apologize for the alignment of the table below. The book vaguely explains routing tables, then has the following example: E15.3) Consider the... (8 Replies)
Discussion started by: ksmarine1980
8 Replies

2. UNIX for Dummies Questions & Answers

HELP me please. UNIX Routing

Hello everybody, I need help: I have to make routing between two different LAN. I have the IP for first network 81.180.75.70 and the mask is 255.255.255.192 and for the second network: 192.168.1.1 and the mask 255.255.255.0 So, each network has only one PC with windows (this is for test),... (0 Replies)
Discussion started by: meorfi
0 Replies

3. IP Networking

IP Routing

I am using RedHat Linux 9, In this box their are two lan intefaces. eth0 ====> LAN 192.168.100.100 255.255.255.0 eth1 ====> Internet Static IP 255.255.255.0 59.144.168.226 (Gateway) I want to define a gateway 59.144.168.226 for my LAN... (2 Replies)
Discussion started by: jaibw
2 Replies

4. Linux

Routing

Hello Friends I have two network cards eth0 192.168.100.1 eth1 10.0.0.1 There NIC connect with diff. LAN I want to make my Linux machine as a Router, Please tell me using IPTABLES command ROUTE command :) (2 Replies)
Discussion started by: jaibw
2 Replies

5. UNIX for Advanced & Expert Users

routing

Hi, in which file and how shuold be decalred a gateway and its IP adresse ? Where and how add a gateway ? Many thanks before. (4 Replies)
Discussion started by: big123456
4 Replies

6. IP Networking

any system call in unix to access ip routing table

hi is there any system call by which ip routing table can be accessed. (1 Reply)
Discussion started by: vinodkumar
1 Replies

7. UNIX for Dummies Questions & Answers

Routing DSL to Unix from Windows

I'm brand new to this forum AND Unix. For obvious reasons. I don't know much at all. I'm 14 and i just got my first UNIX SPARCstation5 SUN computer. Something like that. i set up Solaris 9.1(With the help from my dad), now that i've gotten pertty much everything settled, i would like to route my... (8 Replies)
Discussion started by: SoulCheese
8 Replies

8. UNIX for Dummies Questions & Answers

routing

Can anyone help with the following; I am working on a unix server (Apple OS X Server). We have two network cards in the server. Both cards are on different subnets i.e en1 is on 192.168.10.10/24 and the built in ethernet is on 10.10.150.10/24. From a computer plugged into en1 (and set to ip... (5 Replies)
Discussion started by: mrthrt
5 Replies

9. IP Networking

Routing

ok i configured my gateway and IP address(es) using ifconfig and route.. but how can i bind unique IPs to users ? (im using FreeBSD 4.2 RELEASE #3) (9 Replies)
Discussion started by: DevilGREEN
9 Replies

10. IP Networking

Routing

I have SCO Unix. I have 2 routers. as it is now, when someone telnets to UNIX and goes through router #1 everything is fine. The users who go through router #2 can not connect at all. I talked to CISCO and they said I need to set up a second Gateway on UNIX. They said what is happening is that... (1 Reply)
Discussion started by: john fli
1 Replies
Login or Register to Ask a Question