Here are simple commands to make a Linux machine as router.
1. Assuming eth1 is private network and eth0 is connected to public network (internet)
2. Assuming you want to access internet from prviate network connected to eth1.
3. On all machines in private network, set IP address of eth1 as default gatteway in network settings on internal machines
4. Run following 4 commands on Linux machine
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
5. To save the settings to become persistent across reboots, run command
/sbin/iptables-save > /etc/sysconfig/iptables
Please note: above instructions are tested on Fedora 9. Please change paths or specific commands for other Linux distributions
Popular Posts
-
RBI has now mandated that every credit card transaction must enforce the user to enter a secure PIN pre-registered with the banks. Of cours...
-
Here is an example perl script to send email from a Linux box. VERY IMPORTAT: @ symbol in this file MUST be escaped as \@. for e.g. if y...
-
Here are the settings that need to be done in Windows 7 for kernel debugging: 1. start cmd with admin rights 2. run bcdedit to see existi...
-
After a long time, I got a chance to setup Visual studio and code few things. I could setup Visual studio express edition smoothly but wh...
-
Scenario: You wanna debug an application but you dont have the code for it? You suspect some functions that are failing, you dont feel like ...
-
I got a small appliance (x86 based desktop appliance) where I was installing our custom fedora 9 distribution. Everything was fine except th...
-
Had some success today hooking APIs on linux. Don't think that this is going to be a techy blog-site. Just pasting here for later refere...
-
Just writing some quick notes. Its is compulsary to sign your driver with a digital certificate on Windows 7 64bit edition. In fact it is ...
-
I attended the seminar organized by SEAP on legal issues in InfoTech organized at PSPL, Pune. It was a good event to attend and was very inf...
-
After working as part of sales team I have become more result oriented. I weigh every second in terms of how much I have progressed towards ...
Labels
- activities (1)
- AIT (1)
- ajax (1)
- API hooking (3)
- application virtualization (1)
- attacks (2)
- College (1)
- debugging (2)
- driver development (1)
- e1000 (1)
- e1000e (1)
- express edition 2013 (1)
- Hacking (1)
- Hooking (1)
- I18N (1)
- ideas (3)
- internationalization (1)
- ipsec (1)
- L10N (1)
- LD_PRELOAD (2)
- legal (1)
- Linux (5)
- localization (1)
- MBCS (1)
- missing library (1)
- networking (1)
- NIC drivers (1)
- port forwarding (1)
- propalms network (1)
- pune (1)
- punetech (1)
- remote access (1)
- router (1)
- Security (3)
- SSL (1)
- ssl vpn (1)
- ssl vpn vs ipsec (1)
- startup (2)
- Students (1)
- TCP/IP (1)
- TDI (1)
- Two Factor Authentication (2)
- Unicode (2)
- VC (1)
- vihaan (1)
- vijender (1)
- Vista (1)
- Visual studio (1)
- vmware (2)
- web 2.0 (2)
- windows (2)
- www.vijinc.com (1)
0 comments:
Post a Comment