LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Urgent!!! (https://www.linuxquestions.org/questions/linux-newbie-8/urgent-604289/)

methoxcy 12-03-2007 10:00 PM

Urgent!!!
 
mandriva proxy server

i have two NIC cards (eth0) and (eth1).

eth0 connected to switch which is windows terminal connecting to and eth1 connected to internet i can ping eth0 for lan connection but once i tried to connect to internet nothings happen what would i do??? PREROUTING??

Simon Bridge 12-03-2007 10:13 PM

Quote:

Urgent!!!
Cool... shall I send you a schedule of my fees?

I don't understand what you are saying, but you seem to be having trouble setting up a proxy server. Read through this tutorial and see if you cannot make your question clearer.

methoxcy 12-03-2007 11:40 PM

urgent
 
my linux have two network cards, the one is connection to switch that is connected to several pc(windows) and the other one is for internet. i can access my linux box thru network but if i try to use internet server not found. what should i do :(

mat2ag 12-03-2007 11:49 PM

Did you active packet forwarding (i.e. routing) on your box?

with something like this:
Quote:

echo "1" > /proc/sys/net/ipv4/ip_forward

methoxcy 12-03-2007 11:52 PM

already done my linux box can access internet but those several pc connected to linux not yet what should i do :(

mat2ag 12-04-2007 12:16 AM

did your clients have valid ip address? if not (I think ) you should do source natting on you linux box with such command:
Quote:

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

methoxcy 12-04-2007 12:26 AM

yes! all of them has a valid IPaddress. what should i do :(

Simon Bridge 12-04-2007 12:35 AM

Ahhh... you want to share your linux boxes internet connection with your LAN... that means you want to configure an internet gateway. You do this with IP forwarding in iptables.

http://users.pandora.be/mydotcom/how...uter/linux.htm
http://www.freesoftwaremagazine.com/...ternet_gateway

Post your iptables scrip and we can troubleshoot.

mat2ag 12-04-2007 01:01 AM

IP forwarding does not happen in iptables. iptables is only a packet inspecting subsystem. First answer, if your clients have valid ip address why do you want to use a linux box as a gateway? Second, if you want to do so you need some setting on your box and some setting on your provider gateway, it means that provider should route all packets of your class to your gateway and vice versa (i.e. they should set your gateway address as default gateway for your subnet.) it is better that set a pair of none valid ip address on your gateway and peer gateway only for routing purpose.

methoxcy 12-04-2007 01:02 AM

yes!!! i did it already guys thank you so much godbless and you rock!!!!

Simon Bridge 12-04-2007 03:01 AM

Quote:

yes!!! i did it already guys thank you so much godbless and you rock!!!!
... cool! What did you end up doing?

reddazz 12-04-2007 04:11 AM

methoxcy, can you please us thread titles that describe your problem instead of "urgent". This helps increase the exposure of your thread.

matthewg42 12-04-2007 05:18 AM

Your previous post also marked urgent. You were politely asked not to mark thread as urgent and yet you persist. This is extremely rude. Please do not mark thread urgent - they are not urgent to other users here.


All times are GMT -5. The time now is 12:12 AM.