[LARTC] Source IP translation
Hey everyone, OK, not sure if this is more appropriate on the netfilter mailing list, but here it goes. This is a weird setup that is out of my company's control. We have a webserver setup which will be contacted by several clients with different ip. All of these client ip must be translated to the same ip. The problem is this all has to happen on the same box. So before the packet reaches the apache webserver daemon, can the kernel running on the webserver translate the source address? I have tried iproute2 and iptables with no luck. Looked at netfilter patch-o-matic-ng and did not see anything that would help me. Is this even possible? I would need something like this iptables -A PREROUTING -i ethX -s $CLIENTIP -d $WEBSERVER -j SNAT --to $NEWCLIENTIP but the SNAT is not supported in PREROUTING. Any ideas? I not familiar with iproute2 so if there is a solution could you post the commands. Thank you in advance, Ryan ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Linux router configuration??
I am going to assume you want the most basic router, just two interfaces. 1.) Make sure both network cards have been detected. ifconfig eth0 ifconfig eth1 2.) Set up each interface on its own network, make sure the interface has been activated, you can use ifconfig for this. 3.) issue the command echo 1 > /proc/sys/net/ipv4/ip_forward to enable ip fowarding, w/o this the kernel will not send packets between interfaces 4.) set the clients behind the router to point to the internal ip of your router Any changes made to the system will have to be initialized during the boot process. Of course if you have ip addresses that you would like to nat/masq behind the router, you will have to use iptables. You really should be more specific on your needs. Good luck. > Good morning at all, thanks for previous help, but I have another ask. I have a few > experience of Linux world's, and I need to configure a Linux PC as router, what are > the steps? What do I do? > Thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/