[nos-bbs] JNOS ROOT shell commands - FIXED!

Wm Lewis thunderft at hotmail.com
Sun Nov 28 17:15:46 EST 2010


So, by injecting the "sudo -s" command in the correct place, my JNOS now boots and all routes are working as should
 
They now look like this: (without the beginning and ending quotes)
 
"shell sudo -s iptables -t nat -A PREROUTING -d 192.168.1.7 -p tcp --dport 6300 \-j DNAT --to 44.2.14.1:23"
"shell sudo -s /sbin/ifconfig tun0 192.168.1.7 pointopoint 44.2.14.1 mtu 1500 up"
"shell sudo -s arp -s 44.2.14.1 00:e0:18:02:dd:e0 pub"
"shell sudo -s echo 1 >/proc/sys/net/ipv4/ip_forward"
"shell sudo -s iptables -t nat -A POSTROUTING -s 44.2.14.1/32 -o eth0 -j MASQUERADE"
  
Thank you all that gave input on this. 
 
Bill
KG6BAJ

 


From: thunderft at hotmail.com
...the commands I have in my "autoexec.nos" file wont run correctly this way, because on auto-boot-up, the console 4 is not root.
 
While JNOS will boot and run, these commands (from autoexec.nos) need root permissions:
"shell iptables -t nat -A PREROUTING -d 192.168.1.7 -p tcp --dport 6300 \-j DNAT --to 44.2.14.1:23"
"shell /sbin/ifconfig tun0 192.168.1.7 pointopoint 44.2.14.1 mtu 1500 up"
"shell arp -s 44.2.14.1 00:e0:18:02:dd:e0 pub"
"shell echo 1 >/proc/sys/net/ipv4/ip_forward"
"shell iptables -t nat -A POSTROUTING -s 44.2.14.1/32 -o eth0 -j MASQUERADE"
  
 
Bill
KG6BAJ

 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/nos-bbs_lists.tapr.org/attachments/20101128/241d47b7/attachment.html>


More information about the nos-bbs mailing list